document.getElementById(...)(...)缺少对象?
程序代码:
<input name="option" type="radio" value="1" > <input name="option" type="radio" value="2" > <input name="option" type="radio" value="3" > <a href="#"><img src="5.jpg" width="95" height="81" border="0" onClick="pk()"/> <script type="text/vbscript"> function pk() if document.getElementById("option")(1).checked = true then y = 1 elseif document.getElementById("option")(2).checked = true then y = 2 else y = 3 end if msgbox y end function求原因