導航:首頁 > 編程語言 > url跳轉代碼

url跳轉代碼

發布時間:2023-10-12 20:12:20

A. URL跳轉的幾種方式

1、:

<head><!--以下方式只是刷新不跳轉到其他頁面--><metahttp-equiv="refresh"content="10"><!--以下方式定時轉到其他頁面--><metahttp-equiv="refresh"content="5;url=hello.html"></head>

2、javascript:

①、window.location.href方式

js"><scriptlanguage="javascript"type="text/javascript">//以下方式直接跳轉window.location.href='hello.html';
//以下方式定時跳轉setTimeout("javascript:location.href='hello.html'",5000);
</script>

②、window.navigate方式跳轉

<scriptlanguage="javascript">
window.navigate("target.aspx");</script>

③、window.loction.replace方式

<scriptlanguage="javascript">
window.location.replace("target.aspx");</script>

④、self.location方式

<scriptlanguage="JavaScript">
self.location='target.aspx';</script>

⑤、top.location方式

<scriptlanguage="javascript">
top.location='target.aspx';</script>

⑥、返回方式

<scriptlanguage="javascript">
alert("返回");
window.history.back(-1);</script>
閱讀全文

與url跳轉代碼相關的資料

熱點內容
熹妃q傳的網路什麼時候可以修好 瀏覽:165
key文件linux 瀏覽:990
java調用hessian 瀏覽:486
福建聚合網路公司怎麼樣 瀏覽:302
魅族手機備份文件夾 瀏覽:204
電腦c盤騰訊文件夾有什麼用 瀏覽:467
編程語言哪個最好就業 瀏覽:912
能不能找到cad之前打開的文件 瀏覽:259
怎樣設置文件夾許可權 瀏覽:60
oppo手機如何把圖片壓縮成文件 瀏覽:808
載入語言文件失敗 瀏覽:884
招聘plc編程屬於什麼職位類別 瀏覽:580
appstore改區後購買記錄 瀏覽:538
win10管理該文件沒有與之關聯的程序 瀏覽:799
手機里qt是什麼文件夾 瀏覽:48
筆記本關閉開機密碼 瀏覽:672
無法定位程序輸入點inetntop 瀏覽:22
java修改文件編碼 瀏覽:12
js判斷火狐 瀏覽:229
微信開發支持https介面 瀏覽:779

友情鏈接