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?
↧