Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537
信
51rgb
網(wǎng)頁(yè)自動(dòng)跳轉(zhuǎn)頁(yè)面的代碼在很多時(shí)候都非常的有用,下面的是兩個(gè)簡(jiǎn)單的例子。僅供參考。
方案一,用<meta>里直接寫(xiě)刷新語(yǔ)句:
<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=http://www.51rgb.com">
<title>html網(wǎng)頁(yè)自動(dòng)跳轉(zhuǎn)代碼--西農(nóng)大網(wǎng)站</title>
</head>
<body>
測(cè)試:html網(wǎng)頁(yè)自動(dòng)跳轉(zhuǎn)代碼<br/>
你可以在這里寫(xiě)下你想的一切東西!<br />
如:西北農(nóng)林科技大學(xué)是一所985、211院校。<br />
</body></html>
方案二,用javascript腳本來(lái)跳轉(zhuǎn)
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>正在進(jìn)入西農(nóng)大網(wǎng)站</title>
</head>
<body>
<form name=loading>
<p align=center> <font color="#0066ff" size="2">正在進(jìn)入,請(qǐng)稍等</font><font color="#0066ff" size="2" face="Arial">...</font>
<input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:#0066ff; background-color:#fef4d9; padding:0px; border-style:none;">
<inputtype=text name=percent size=47 style="color:#0066ff; text-align:center; border-width:medium; border-style:none;">
<script>
var bar=0
var line="||"
var amount="||"
count
function count{
bar=bar+2
amount =amount + line
document.loading.chart.value=amount
document.loading.percent.value=bar+"%"
if (bar<99)
{setTimeout("count",100);}
else
{window.location =http://www.51rgb.com;}
}</script>
</p>
</form><p align="center">
測(cè)試:html網(wǎng)頁(yè)自動(dòng)跳轉(zhuǎn)代碼<br/>
你可以在這里寫(xiě)下你想的一切東西!<br />
如:西北農(nóng)林科技大學(xué)是一所985、211院校。<br /><br />
如果您的瀏覽器不支持跳轉(zhuǎn),<astyle="text-decoration: none" ><font color="#FF0000">請(qǐng)點(diǎn)這里</font></a>.</p>
</body>
</html>
↓↓↓
法1:使用onclick事件
<input type="button" value="按鈕" onclick="javascrtpt:window.location. />
或者直接使用button標(biāo)簽
<button onclick="window.location.>百度</button>
方法2:在button標(biāo)簽外套一個(gè)a標(biāo)簽
<a > <button>百度</button> </a>
或使用
<a ><input type="button" value='百度'></a>
方法3:使用JavaScript函數(shù)
*請(qǐng)認(rèn)真填寫(xiě)需求信息,我們會(huì)在24小時(shí)內(nèi)與您取得聯(lián)系。