HTML DOM Checked ÊôÐÔ
¶¨ÒåºÍÓ÷¨
checked ÊôÐÔ¿ÉÉèÖûò·µ»ØÄ³¸öµ¥Ñ¡°´Å¥ÊÇ·ñ±»Ñ¡ÖС£
Óï·¨
radioObject.checked=true|false
ʵÀý
ÏÂÃæµÄÀý×ӿɶÔÒ»¸öµ¥Ñ¡°´Å¥½øÐÐÑ¡¶¨ºÍ²»Ñ¡¶¨£º
<html> <head> <script type="text/javascript"> function check() {document.getElementById("radio1").checked=true
} function uncheck() {document.getElementById("radio1").checked=false
} </script> </head> <body> <form> <input type="radio" id="radio1" /> <input type="button" onclick="check()" value="Check" /> <input type="button" onclick="uncheck()" value="Uncheck" /> </form> </body> </html>