mercredi 29 janvier 2020

Passing checkbox value from .html page to .js file (not mvc)

I need to pass a checkbox value from my .html page to a seperate .js file. the .js file doesn't share a window, I cant use jQuery, and its not MVC so no tempdata or controllers etc. Any ideas? Thanks

if(checkboxid == true){
  function myfunction(){
    //do stuff
  }
}
and in a separate file + window..
<input type="checkbox" id="checkboxid" name="checkboxid" checked>
<input type="hidden" id="checkboxid" name="checkboxid" value="false">



Aucun commentaire:

Enregistrer un commentaire