| 
                         烈火网(LieHuo.Net)教程 Asp Php Js Html网页跳转代码大全,请加入收藏,以备不时之需。 
<一>三种网页跳转代码: 
如果你要在服务器端跳转,可以这样: 
Response.Redirect(www.veryhuo.com) Response.End 
如果你要在客户端跳转,可以这样: 
<script language="javascript" type="text/javascript"> window.location="http://www.veryhuo.com";; </script> 
如果你要让页面显示几秒钟之后跳转,可以在html代码的<head></head>部分加上这样的代码: 
<meta http-equiv="refresh" content="3; url=http://www.veryhuo.com"> 
以上三种是也比较常见,比较常用的网页跳转代码运行平台Win9x WinNT Win2000 WinME WinXP。 
<二>几段简单的网页跳转代码 
不隐藏转向之后的地址 
<html> <title>www.veryhuo.com</title> </head> <body> <form name=loading> <P align=center><FONT face=Arial color=#0066ff size=2>loading...</FONT> <INPUT  style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bolder; PADDING-BOTTOM: 0px; COLOR: #0066ff; BORDER-TOP-style: none; PADDING-TOP: 0px; FONT-FAMILY: Arial; BORDER-RIGHT-style: none; BORDER-LEFT-style: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-style: none"  size=46 name=chart> <BR><INPUT  style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; COLOR: #0066ff; BORDER-BOTTOM: medium none; TEXT-ALIGN: center"  size=47 name=percent> <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.veryhuo.com";}  }</SCRIPT> </P></form> </body> </html>  
不隐藏转向之后的地址 
<html> <body> <script language="javascript"> <!-- function goToURL() { //v2.0 for (var i=0; i< (goToURL.arguments.length - 1); i+=2) //with arg pairs eval(goToURL.arguments+".location=''"+goToURL.arguments[i+1]+"''"); document.returnvalue = false; } //--> </script> <body bgcolor="#FFFFFF" onLoad="goToURL(''parent'',''http://www.veryhuo.com'');return document.returnvalue"> </body> </html>  
不隐藏转向之后的地址 
<html> <SCRIPT LANGUAGE="javascript"> <!-- Start Code var ver = navigator.appVersion; if (ver.indexOf("MSIE") != -1) { window.location.href="http://www.veryhuo.com" }else window.location.href="http://www.veryhuo.com" // End Code --> </SCRIPT> </html>  
不隐藏转向之后的地址 
<html> <body> <meta http-equiv="refresh" content="0.1;url=http://www.veryhuo.com"> </body> </html>  
可隐藏转向之后的地址: 
<html> <frameset framespacing="0" border="0" rows="0" frameborder="0"> <frame name="main" src="http://www.veryhuo.com" scrolling="auto" noresize> </frameset> </html>  <三> 
1,页面自动刷新:把如下代码加入<head>区域中 <meta http-equiv="refresh" content="20"> 其中20指每隔20秒刷新一次页面. 
2,页面自动跳转:把如下代码加入<head>区域中 <meta http-equiv="refresh" content="20;url=http://www.veryhuo.com"> 其中20指隔20秒后跳转到http://www.veryhuo.com页面。 
 <html> <head> <title>正在进入 http://www.veryhuo.com >>> Loading>>> </title> </head> <body bgcolor="#FFFFFF" text="#000000"> <p> </p><tr> <td width=724> <p align=center> </p> <p align=center><b><font size="6">烈火网地址:</font><font color="red" size="6"> http://www.veryhuo.com !</font></b></p> <p align=center><b><font size="6">正在进入,请等待,谢谢......</font></b></p></td></tr><tr> <td width="724"> <p align=center> <form name=loading> <div align=center> <p> <input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:rgb(124,119,119); background-color:white; padding:0px;border-style:none;"> <br> <input type=text name=percent size=46 style="color:rgb(138,134,134); 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()",10);} else {window.location = "http://www.veryhuo.com";} }</script> 
</body> </html> 
以asp可以用以下方式: 
<% response.redirect "http://www.veryhuo.com" %> 
                         (编辑:泰州站长网) 
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! 
                     |