<%@ language="vbscript" %>
<%
'/*=================判断学号是否为空====================*/
Dim studentnumber
dim studentnumberout
studentnumber=Trim(request.Form("studentnumber"))
If studentnumber="" Then
response.write "<script>alert('学号不能为空!');location.href='lzm.html'</script>"
end if
%>
'=================判断学号是否为数字====================
<%
function check()
for i=1 to len(trim(studentnumber.value))
c=mid((studentnumber.value),i,1)
if not(c>"0" and c<"9")then
alert("请输入数字!")
studentnumber.focus()
studentnumber.select()
exit for
else
Response.write "你的输入正确!"
studentnumberout=studentnumber
end if
next
end function
'if(<%=isnumeric("studentnumber")%)
'then
'Response.write "你的输入正确!"
'else
'response.write "<script>alert('学号为数字!');location.href='lzm.html'</script>"
%>
'=================判断姓名是否为空====================
<%
Dim name1
dim nameout
name1=Trim(request.Form("name1"))
If name1="" Then
response.write "<script>alert('姓名不能为空!');location.href='lzm.html'</script>"
else
'=================判断姓名是否为汉字====================
if request.form("name1")<>"" then
if Len(Hex(Asc(request.form("name1"))))>2 Then
Response.Write "输入正确:这个是中国文字!"
nameout=name1
else
Response.Write "输入错误:这个是什么鸟字呢?"
end if
end if
end if
%>
'=================判断成绩是否为空====================
<%
Dim grade
dim gradeout
grade=Trim(request.Form("grade"))
If grade="" Then
response.write "<script>alert('成绩不能为空!');location.href='lzm.html'</script>"
else
'=================判断成绩是否为数字====================
function check()
for i=1 to len(trim(studentnumber.value))
c=mid((studentnumber.value),i,1)
if not(c>"0" and c<"9")then
alert("请输入数字!")
studentnumber.focus()
studentnumber.select()
exit for
else
Response.write "你的输入正确!"
gradeout=grade
end if
next
end function
end if
'response.write "<tr>"
'response.write "<td><font size=2>" & rs("xbie") & "</a></font></td>"
%>
高手帮忙看一下啊 郁闷中