<head runat="server">
<title></title>
<script type="text/javascript" src="http://include.manmango.com/js/jquery-1.6.1.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var c = 2
var timeVal = setInterval(function () {
$("#timer").val(c)
if(c == 0){
clearTimeout(timeVal)
window.location.href = "Default2.aspx?user_id=" + $("#Label1").text() //向页面Default2传递值
}
c--
}, 1000)
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="timer" runat="server"></asp:TextBox>
<asp:Label ID="Label1" runat="server" >5</asp:Label>
</div>
</form>
</body>
</html>
js为我们提供了大量的跳转页面的命令了 下面我来给大家总结一些常用的js跳转页面方法 希望各位同学有所帮助
第一种
代码如下
window location
第二种 跳到前一个历史记录
代码如下
window history back( )
第三种
代码如下
window navigate(“
第四种
代码如下
self location=’
第五种
代码如下
top location=’
第六种
代码如下
window open(pageURL name parameters)
window open("alwaysraised " "_blank" "alwaysRaised")
第七种
代码如下
lishixinzhi/Article/program/Java/JSP/201311/19856