您的位置:程序门 -> vb -> 网络编程



在(vbs)网页编程中:action  和 onsubmit() 或oncheck()事件可以同时用吗? 怎样才能做到根据(onsubmit)事件触发(action)命令.我的程序怎么是同时响应的阿,请各位大虾诊断一下,谢谢了,各位大虾!!


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


在(vbs)网页编程中:action 和 onsubmit() 或oncheck()事件可以同时用吗? 怎样才能做到根据(onsubmit)事件触发(action)命令.我的程序怎么是同时响应的阿,请各位大虾诊断一下,谢谢了,各位大虾!!
发表于:2008-02-27 10:34:45 楼主
在(vbs)网页编程中:action     和   onsubmit()   或oncheck()事件可以同时用吗?   怎样才能做到根据(onsubmit)事件触发(action)命令.我的程序怎么是同时响应的阿,请各位大虾诊断一下,谢谢了,各位大虾!!
<html>
<head>
<title> 阳光工程 </title>
<meta   http-equiv="content-type"   content="text/html;   charset=gb2312">
<meta   name="vi60_defaultclientscript"   content="vbscript">
<script   language   ="vbscript">
sub   check1()
        if   frm1.t1.value <> empty   and   frm1.t2.value <> empty   then
              hh=msgbox("你好:"   &   len(trim(frm1.t1)),48,"正确")
            else
              hh=msgbox("你好:请输入完整的数据......",48,"错误提示")
              focusto(0)
              exit   sub
        end   if
end   sub

sub   focusto(x)
        document.frm1.elements(x).focus()
end   sub
</script>
</head>
<body   bgcolor="#0099ff"   text="#ffffff">
<p>
  </p>
<form   name=frm1     action="index.asp"     method=post   >
<p> </p>
<table   width="27%"   cellspacing="0"   id="table1"   align="right"   height="47"   cellpadding="0"   border=0>
<tr>
<td   width="747"   align="right"> 用户姓名: </td>
<td   width="99"> <input   type="text"   name="t1"   size="13"> </td>
<td   width="60"   rowspan="2">
<input   type="image"   tabindex="3"   src="button23.jpg"   width="54"   height="48"   onsubmit="check1()"
name="i1"   > </td>
</tr>
<tr>
<td   width="747"   height="22"   align="right"> 用户密码: </td>
<td   width="99"   valign="top"> <input   type="password"   name="t2"   size="13"> </td>
</tr>
</table> </form>
</body>

</html>


快速检索

最新资讯
热门点击