迷失森林火把怎么做:关于javascript的alert

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/05 17:49:20
<% if trim(request.Form("stu_name"))="" then%>
<script language="javascript">
alert("请输入你姓名!\n");history.go(-1)</script>
<%end if%>

以上的代码有什么错误,以前我在win2000server上一直是这样用的,但是在xp上就不行了,拜一个!

history.go(-1);

<jscript>里面要以分号结束

<% if trim(request.Form("stu_name"))="" then%>
<script language="javascript">
alert("请输入你姓名!\n");
history.go(-1);
</script>
<%end if%>