<html>
<body>
<table width="100%" height="53" border="0" align="center" id="application">
<tr bgcolor="#ffce7b">
<td height="0" colspan="5" class="zBgLine"> </td>
</tr>
<tr bgcolor="#ffce7b" class="zBgText" width="100%">
<td width="86" height="32" class="zBgLabels" align="right"> 功能詳解<strong></strong> </td>
<td width="129" class="zBgText"><input type="radio" name="obj_type" value="add" /> 新增用戶 </td>
<td width="132" class="zBgText"><input type="radio" name="obj_type" value="del" selected/>刪除會員</td>
<td width="122" class="zBgText"><input type="radio" name="obj_type" value="addset"/>新增設置</td>
<td width="109" class="zBgText"><input type="radio" name="obj_type" value="delset" />刪除設置</td>
<td>
<input type="submit" name="test" value="subMit" onclick="return myalert();" />
<input type="hidden" name="var1" value="test" />
</td>
</tr>
</table>
</body>
</html>
<script language="javascript">
function myalert(){
if ( document.all.var1.value == "test" ) {
alert( document.all.obj_type.value);
}
}
</script>
[求助]請幫忙看一下,為何彈出的是undefined?