Article 5B2SY [SOLVED] JavaScript function about CheckBox

[SOLVED] JavaScript function about CheckBox

by
droid.c3p0
from LinuxQuestions.org on (#5B2SY)
Creation of a Checkbox inside table cell:
Code:<td>
<input type="checkbox" id="chkbx1" name="Chkbx1" value="Checkbox1">
<label for="chkbx1"> 1</label>
</td>I am trying to understand is a Checkbox checked or not:
Code:<script type="text/javascript">
function Click1()
{
var c = document.getElementById("chkbx1").innerHTML;
if (c !== "checked")
{
........
}
}
</script>Above function does not work the way I expect.
How to correct the function, so it to understand is a Checkbox checked or not ?latest?d=yIl2AUoC8zA latest?i=imFEF8WS_wU:9NUP4WjOBNk:F7zBnMy latest?i=imFEF8WS_wU:9NUP4WjOBNk:V_sGLiP latest?d=qj6IDK7rITs latest?i=imFEF8WS_wU:9NUP4WjOBNk:gIN9vFwimFEF8WS_wU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments