日期:2014-05-16 浏览次数:20370 次
<html> <head> <script language="JavaScript" type="text/JavaScript"> function testnamedss() { document.all.test.name = "testName"; document alert(document.getElementsByName("testName")); alert(document.getElementsByName("testName").checked); } </script> </head> <body> <form name="test"> <input type="checkbox" id="test" /> <input type="button" value="GO" onClick="testnamedss()" /> </form> </body> </html>