js提交表单后跳转到指定页面显示

JavaScript05

js提交表单后跳转到指定页面显示,第1张

要实现从一个页面A跳到另一个页面B,js实现就在A的js代码加跳转代码

JS跳转大概有以下几种方式:第一种:(跳转到b.html)

<script language="javascript" type="text/javascript">

window.location.href="b.html"

</script>

第二种:(返回上一页面)

<script language="javascript">

window.history.back(-1)

</script>

第三种:

<script language="javascript">

window.navigate("b.html")

</script>

第四种:

<script language="JavaScript">

self.location=’b.html’

</script>

第五种:

<script language="javascript">

top.location=’b.html’

</script>

<%

uName=trim(request("username"))

uPwd=trim(request("psw"))

%>

这样就可以把用户名和密码分别存到uName和uPwd变量中去,然后根据你的实际需求对这两个变量进行相应的操作!

<form name="form1" method="post" action="第二页页面文件名" onSubmit="return check(this)">