radiobutton的小问题,高手帮我改改好吗?
我定义了2个radiobutton,初始时为无选择,在提交时我在check_submit()函数里
判断是否选择了按钮,但(2)处出错,错误类型为“不支持document.form1.radiobutton.value属性或方法”,
但(1)处又是正常的,那位高手请帮我改改(2)处好吗?
If Request.QueryString ("k")=1 Then
irepairid=trim(Request.Form("hid_repairid"))
If Cint(Request.Form("radiobutton"))=1 Then ************************(1)
sSql="update repairform set repairman='"&irepairman& "',state='4' "
sSql=sSql&" where LTRIM(RTRIM(repairid))=LTRIM(RTRIM('"&irepairid& "')) "
conn.Execute sSql
ElseIf Cint(Request.Form("radiobutton"))=2 Then
sSql="update repairform set repairman='"&irepairman& "',state='5' "
sSql=sSql&" where LTRIM(RTRIM(repairid))=LTRIM(RTRIM('"&irepairid& "')) "
conn.Execute sSql
End If
If Err.number<>0 Then
Response.Write "数据库操作失败!"
Response.End
Else
Response.Redirect "wxchkque.asp"
Response.End
End if
End if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK REL=StyleSheet HREF="design.css" TYPE="text/css" MEDIA=screen>
</head>
<Script language="vbscript">
Sub check_submit()
' If Trim(document.form1.radiobutton.value)="" Then ***************************(2)
' msgbox "请选择审核按钮!",vbOKOnly,"出错信息"
' Exit sub
' Else
document.form1.submit()
' End if
End Sub
</Script>
<body bgcolor="#FFFFFF" text="#000000" background="img/snow.gif">
<table width="100%" border="0">
<tr>
<td width="40%"><font size="3" face="仿宋_GB2312, 宋体">运行部门>>修改故障报修单 </font></td>
<td width="11%"><font size="3" face="仿宋_GB2312, 宋体"></font></td>
<td width="49%">
<p align="right"><font size="3" face="仿宋_GB2312, 宋体">002操作员,欢迎登录!</font></p>
</td>
</tr>
</table>
<p align="center"><font color="#FF0000"><b><font color="#0000FF">维修服务报修单</font></b></font></p>
<p align="right"><font size="3" face="仿宋_GB2312, 宋体">故障报修流水号:<font face="Times New Roman, Times, serif">NO.000123456</font></font></p>
<form name="form1" method="post" action="wxchkdetail.asp?k=1">
<table width="100%" border="1" align="center">
<tr bgcolor="#FF9999">
<td width="50%"> 审核结果: </td>
<td width="50%" bgcolor="#FF9999">
<p>
<input type="radio" name="radiobutton" value="1">
<input type="text" name="textfield" value="通过,可以销单">
</p>
<p>
<input type="radio" name="radiobutton" value="2">
<input type="text" name="textfield3" value="不通过,待核实">
</p>
</td>
</tr>
</table>
<p align="center">
<input type="button" name="submit1" value="确定" onclick="check_submit()" > ***********************(3)
<input type="button" name="button" value="返回" onclick="history.back()">
</p>
</form>
</body>
</html>