javascript与asp写混掉了呀<%
function hit(tform)
{var pin=""
if studentuser="" then
document.all.studentname.focus()
pin<>""
document.all.studentname.focus()
alert("错误:请输入用户名")
end if
if studentuser.length>10 then
document.all.studentname.focus()
pin<>""
alert("错误:输入的用户名过长")
end if
if studentnumber="" then
document.all.studentname.focus()
pin<>""
alert("错误:请输入密码")
end if
if studentnumber.length>12 then
document.all.studentname.focus()
pin<>""
alert("错误:输入的密码过长")
end if
if pin<>"" then //这是vbs
response.write error
response.end
end if
}
%>重写吧
function hit(tform)
{var pin=""
if studentuser="" then
document.all.studentname.focus()
pin<>""
document.all.studentname.focus()
alert("错误:请输入用户名")
end if
if studentuser.length>10 then
document.all.studentname.focus()
pin<>""
alert("错误:输入的用户名过长")
end if
if studentnumber="" then
document.all.studentname.focus()
pin<>""
alert("错误:请输入密码")
end if
if studentnumber.length>12 then
document.all.studentname.focus()
pin<>""
alert("错误:输入的密码过长")
end if
if pin<>"" then //这是vbs
response.write error
response.end
end if
}
%>重写吧
解决方案 »
- asp.net(c#)想做一个导航栏 鼠标移动到那个项那个就变英文鼠标移开变回中文
- 为什么新闻内容里有图片,所设的行高就不起作用了啊.
- datalist中textbox的怪现象
- GridView的一个比较菜的问题
- 顽固的"无法向会话状态服务器发出会话状态请求"错误!欲深入探讨ASP.Net状态信息处理机制者入!
- Repeater 如何显示一行两列
- <%# %>内再嵌套<%# %>的问题????
- 求好用的日期控件源码,急!!!!!
- 我安装了IE2008后,为什么JavaScript不能调试了?
- 客户端的函数,服务器端怎么调用?
- 动态javascript 的问题
- 只能有一个form但是两个按钮要提交到不同页面怎么弄啊?
语法的问题:
if studentnumber="" then
document.all.studentname.focus()
pin<>""
alert("错误:请输入密码")
end if你有一个“)”用的是汉字的!
function hit()
{var pin=""
if (document.all("studentname").value="")
{
document.all("studentname").focus();
//pin<>""
document.all("studentname").focus();
alert('aaaaaaa');
alert('错误:请输入用户名')
}if (document.all("studentname").value.length>10)
{
document.all("studentname").focus();
//pin<>""
alert('错误:输入的用户名过长');
}if (document.all("studentnumber").value="" )
{
document.all("studentname").focus();
//pin<>"";
alert('错误:请输入密码');
}if (document.all("studentnumber").value.length>12 )
{
document.all("studentname").focus();
//pin<>"";
alert('错误:输入的密码过长');
}//if (pin<>"" )
//{
//response.write error;
//response.end;
//}
}
</script>
其余的部分我注释了,你自己改改,逻辑上我没有研究含意。