日期:2014-05-17  浏览次数:20966 次

简单问题,在线等...
<html>

<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<title> 新建网页   2 </title>
</head>
<script   language= "vbscript ">
function   dosave
if   frmxx.R1.value= "0 "   then  
msgbox   "安装单! ",vbInformation, "提示 "      
end   if
frmxx.action= "gd_edit_save.asp "
frmxx.submit
end   function
</script>
<body>
<form   action= " "   method= "POST "   id= "frmxx "   name= "frmxx ">
<input   type= "radio "   value= "0 "   name= "R1 "> 安装送货
<input   type= "radio "   value= "1 "   name= "R1 "> 维修类
<input   type= "radio "   value= "2 "   name= "R1 "> 技术类
<input   type= "radio "   value= "3 "   name= "R1 "> 工程类
  <input   type= "button "   class= "button "   onclick= 'vbscript:dosave '     value= "保存 "   id= "button1 "   name= "button1 ">
</form>

</body>

</html>
我想得到的是当选择安装送货单,保存时系统会提示,但运行时出现frmxx.r1.value   对象不支持此属性或方法
请大家帮忙看下如何操作/

------解决方案--------------------
<script language= "vbscript ">
Sub dosave
Dim flag
Dim sValue
flag = False

For Each rs In frmxx.R1
If rs.checked Then
flag = True
sValue = rs.Value
Exit For
End if
Next
If flag Then
If sValue = 0 Then
MsgBox "安装单! ",vbInformation, "提示 "
Exit Sub
End if
End if
If flag=false Then
msgbox "请选择! ",vbInformation, "提示 "
Exit Sub
End if

frmxx.action= "gd_edit_save.asp "
frmxx.submit
end Sub
</script>