導航:首頁 > 源碼編譯 > html跳轉源碼的網站

html跳轉源碼的網站

發布時間:2022-05-09 20:24:01

⑴ html頁面 跳轉其他網址 完整代碼

<!DOCTYPEhtml>
<htmllang="en">
<head>
<metacharset="UTF-8">
<title>Document</title>
</head>
<script>
window.location.href="http://..com/question/1303800286938553059.html?entry=qb_ihome_tag"
</script>
<body>
</body>
</html>

不顯示內容 直接跳轉到其他頁面

⑵ 網頁自動跳轉代碼html

<meta http-equiv="Refresh" content="3;URL=1111111.html" />
不會javaScript的話就用html語言也可以實現
content屬性設置時間 url是目標頁面。
放在haed中。

可以多個頁面連續跳轉~

頁面首頁代碼:
<meta http-equiv="Refresh" content="3;URL=1111111.html" />
1111111.html頁面的代碼:
<meta http-equiv="Refresh" content="3;URL=2222222.html" />
2222222.htnl頁面的代碼:
<meta http-equiv="Refresh" content="3;URL=3333333.html" />

上面的代碼先從首頁開始3秒後進入1111111.html頁面,再過3秒後進入2222222.html頁面,再過3秒後進入3333333.html頁面。
======================================================
因樓主沒聽懂 我直接發完整代碼吧~
第一個文件 文件名為index.html 代碼如下:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<meta http-equiv="Refresh" content="5;URL=1.html" />
</head>
<body>
<h1>
此頁的文件名為index.html<br />
這是第一個沒面。。。。<br />
5秒後進入第二個頁面。。。<br />
兩個頁面將循環轉向。
</h1>
</body>
</html>

第二個文件 文件名為1.html 代碼如下:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<meta http-equiv="Refresh" content="5;URL=index.html" />
</head>
<body>
<h3>
此頁的文件名為1.html<br />
這是第二個沒面。。。。<br />
5秒後進入第一個頁面。。
</h3>
</body>
</html>
=================完
這里關鍵標簽就是<meta http-equiv="Refresh" content="5;URL=1.html" />
和<meta http-equiv="Refresh" content="5;URL=index.html" />
其他你可以不看~ 這個絕對可以,我已經試了。

⑶ 如何用html代碼 實現頁面跳轉

下面列了五個例子來詳細說明,這幾個例子的主要功能是:在5秒後,自動跳轉到同目錄下的hello.html(根據自己需要自行修改)文件。

1、html的實現

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

優點:簡單;
缺點:Struts Tiles中無法使用。


2、javascript的實現

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

優點:靈活,可以結合更多的其他功能;
缺點:受到不同瀏覽器的影響。


3、結合了倒數的javascript實現(IE)

<spanid="totalSecond">5</span>
<scriptlanguage="javascript"type="text/javascript">
varsecond=totalSecond.innerText;
setInterval("redirect()",1000);
functionredirect(){
totalSecond.innerText=--second;
if(second<0)location.href='hello.html';
}
</script>

優點:更人性化;
缺點:firefox不支持(firefox不支持span、div等的innerText屬性)。


4、解決Firefox不支持innerText的問題

<spanid="totalSecond">5</span>
<scriptlanguage="javascript"type="text/javascript">
if(navigator.appName.indexOf("Explorer")>-1){
document.getElementById('totalSecond').innerText="mytextinnerText";
}else{
document.getElementById('totalSecond').textContent="mytexttextContent";
}
</script>


5、整合3)和3')

<spanid="totalSecond">5</span>

<scriptlanguage="javascript"type="text/javascript">
varsecond=document.getElementById('totalSecond').textContent;

if(navigator.appName.indexOf("Explorer")>-1){
second=document.getElementById('totalSecond').innerText;
}else{
second=document.getElementById('totalSecond').textContent;
}

setInterval("redirect()",1000);
functionredirect(){
if(second<0){
location.href='hello.html';
}else{
if(navigator.appName.indexOf("Explorer")>-1){
document.getElementById('totalSecond').innerText=second--;
}else{
document.getElementById('totalSecond').textContent=second--;
}
}
}
</script>

⑷ html按鈕跳轉網頁代碼怎麼回事

這是設置的問題,<a href="你要跳轉到的頁面的網址">按鈕標簽</a>,具體操作方法如下:

1、首先,我們新建一個帶有button按鈕的頁面,在Dreamweaver中打開這個頁面。

php或html網頁跳轉代碼

<table style="width:100%; height:100%;">
<tr style="height:100%;">
<td style="text-align:left;width:170px;vertical-align:top;background-color:#9ACD32;">
<ul id="ull" style="">
<li id="a" onclick="danwei(this)">購進食材</li>
<li id="e" onclick="danwei(this)">食材消耗記錄</li>
<li id="b" onclick="danwei(this)">維護食材信息</li>
<li id="c" onclick="danwei(this)">維護食材分類信息</li>
<li id="d" onclick="danwei(this)">維護單位信息</li>
</ul>
</td>
<td>
<iframe id="aa" src="shibiao.html" style="width:100%;height:100%;" scrolling="auto" frameborder="0"></iframe>
</td>
</tr>
</table>
<script>
function danwei(fan) {
if (fan.id == "d") {//判斷 id為d 時執行下面語句
document.getElementById("aa").src = "danweixinxi.html";//找到id「aa」 src=「單位信息.html」
} else if (fan.id == "a") {
document.getElementById("aa").src = "shibiao.html";//找到id「aa」 src=「食表=食材表.html」
} else if (fan.id == "c") {
document.getElementById("aa").src = "shicaifeilei.html";
} else if (fan.id == "b") {
document.getElementById("aa").src = "shicai.html";
} else if (fan.id == "e") {
document.getElementById("aa").src = "shicaixiaohaojl.html";
}
}
</script>

⑹ html跳轉代碼

這個就是了,測試了好多種的,這個是5秒之後跳轉的代碼,時間可以自己改
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>5秒後跳轉到另一個頁面</title>
</head>
<script>
var t = 5;
var s = '.';
timeID=setInterval("countDown()",1000);
function countDown(){
time.innerHTML= t +"秒後跳轉"+s;
t--;
s+='.';
if (t==0) {
location.href="http://www.51zuoyi.com/"; //【這邊是要跳轉的目標地址】
clearInterval(timeID);
}
}
</script>
<body>

<div><font ID="time" face="impact" color="#272822" size="7">即將跳轉</font>
</div>
</body>
</html>
把目標網址改為自己的就可以實現跳轉了,效果可以參考一下下面

⑺ html網頁跳轉代碼怎麼寫

用<meta>里直接寫刷新語句:

<html>
<head>
<meta http-equiv="Content-Language" content="zh-CN">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<meta http-equiv="refresh" content="5;url=網址">
<title>html網頁自動跳轉代碼</title>
</head>
<body>

測試:html網頁自動跳轉代碼<br/>

你可以在這里寫下你想的一切東西!<br />

</body>
</html>

⑻ html網頁 實現自動跳轉 完整代碼

兩種方法,一種是後台里直接跳轉,比如Response.Redirect(url)
第二種是用JQuery配合JS跳轉,
$(function(){
location.href
=
url;
})
或者純JS:
document.ready(function(){
location.href
=
url;
})

⑼ html點擊一個按鈕,跳轉到當前頁面的另一個指定位置!這樣的代碼怎麼寫

建設網站時,經常會遇到需要跳轉頁面的情況,例如我們的網站分中英文版本,網站程序索引頁不是直接放在根目錄下,而是分別放在「en」和「cn「目錄中區分中英版本。

打開網站時,想直接跳轉到en目錄訪問英文版,則需要使用跳轉代碼跳轉後方可以訪問。通過html代碼跳轉頁面的詳細步驟:

1、打開Dreamweaver,新建html頁面;

⑽ html頁面網頁跳轉代碼

<html>
<head>
<title>pageA</title>
<scripttype="text/javascript">
functiondelyLoad(){
setTimeout(function(){
window.location.href='b.html';
},5000)
}
</script>
</head>

<bodyonload="delyLoad()">
<h1>A</h1>
</body>
</html>

閱讀全文

與html跳轉源碼的網站相關的資料

熱點內容
jtbcphp 瀏覽:337
編程時遇到源代碼未編譯如何處理 瀏覽:431
綠源app怎麼查看綁定系統 瀏覽:357
qq里的壓縮文件怎麼保存 瀏覽:349
傷寒論桂林pdf 瀏覽:684
樹洞app怎麼搜索好友 瀏覽:217
冷庫壓縮機如何注油 瀏覽:641
無線wifi怎麼加密呢 瀏覽:432
linuxjava配置環境變數 瀏覽:702
rust伺服器怎麼下載地圖 瀏覽:831
程序員那麼可愛被誤會的片段 瀏覽:39
好玩免費的伺服器地址 瀏覽:344
vb腳本編譯 瀏覽:18
單片機led顯示數字 瀏覽:379
vim編譯器是什麼 瀏覽:385
ava程序員面試標准 瀏覽:791
安卓原生系統狀態欄編譯美化 瀏覽:64
java線程是什麼意思 瀏覽:710
如何查看伺服器的外網ip地址 瀏覽:721
命令方塊放置方塊 瀏覽:367