首先,先建立一個(gè)用于跳轉(zhuǎn)的頁面,代碼如下。
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
html xmlns="http://www.w3.org/1999/xhtml" >
head id="Head1" runat="server">
title>跳轉(zhuǎn)頁面/title>
script type="text/javascript">
var i = 5;
window.onload=function page_cg()
{
document.getElementById("time").innerText = i;
i--;
if(i==0)
{
window.location.href("XXXXX/Home.aspx");
}
setTimeout(page_cg,1000);
}
/script>
/head>
body>
form id="form1" runat="server">
div style="font-size:small;">
密碼修改成功,請(qǐng)牢記!
br />
秒后自動(dòng)跳到系統(tǒng)a href="XXXXX/Home.aspx">首頁面/a>...還剩span id="time" style="font-weight:bold;color: blue">5/span>秒!
br />
或者返回a href="Login.aspx">登陸頁面/a>...
/div>
/form>
/body>
/html>
Response.Redirect("LoginTiao.aspx");
代碼簡單就不貼圖了!
標(biāo)簽:宣城 西藏 湖州 岳陽 紅河 福州 衢州 西寧
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《asp.net中倒計(jì)時(shí)自動(dòng)跳轉(zhuǎn)頁面的實(shí)現(xiàn)方法(使用javascript)》,本文關(guān)鍵詞 asp.net,中,倒計(jì)時(shí),自動(dòng),跳轉(zhuǎn)頁,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。