Quantcast
Channel: Posts/rss
Viewing all articles
Browse latest Browse all 52

Comment from FYRe

$
0
0
With declared global variables, how do I set them as an id for (Eg. a checkbox). ---------------------------------------------- eg: <script language="JavaScript"> var num1 = 0; function thisIsAFunction() { <input type="checkbox" id="num1"> num1++; } function thisIsAnotherFunction() { ..... } </script> ---------------------------------------------- By setting the globally declared variables as an ID to the checkbox, I could then access the checkbox based on the ID from another function. Can anyone help?

Viewing all articles
Browse latest Browse all 52

Trending Articles