Jan 17, 2010

Get check box value using JavaScript

"document.getElementById("myCheck").checked=true;" will get the check
box value when it is checked/clicked.

"document.getElementById("myCheck").checked=false;" will get the check
box value when it is unchecked.

Write me if you have find any issues.

File : CheckBox_JS.html

<html>
<head>
<script type="text/javascript">
function check()
{
document.getElementById("myCheck").checked=true;
}
function uncheck()
{
document.getElementById("myCheck").checked=false;
}
</script>
</head>
<body>
<form>
<input type="checkbox" id="myCheck" />
<input type="button" onclick="check()" value="Check Checkbox" />
<input type="button" onclick="uncheck()" value="Uncheck Checkbox" />
</form>
</body>
</html>

====================
Saalram
Publicize yourself ... Free!
http://saalram.com
====================

No comments:

Post a Comment

Saalram.com

Saalram
Publicize yourself ...
http://saalram.com

Free !!!


Place your Ad here - Free!!!
just drop us a mail ... saalram.service@gmail.com

Free !!!