快捷搜索:   服务器  安全  linux 安全  MYSQL  dedecms

实现html页面跳转的3种方法

有3种方法可以实现html的页面跳转,1,refresh 2,onload事件中加入代码 3,js实现

1、refresh 
 

  1. <html> 
  2. <body> 
  3. <meta http-equiv="refresh" content="0;url=http://www.bnxb.com"> 
  4. </body> 
  5. </html> 



2、onload事件中加入代码
 

  1. <html> 
  2. <head> 
  3. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
  4. <title>山寨站长站</title> 
  5. </head> 
  6. <body onLoad="parent.location='http://www.bnxb.com'"> 
  7. </body> 
  8. </html> 


3、js实现
 

  1. <script language="JAVASCRIPT">  
  2. setTimeout("document.location.href='http://www.bnxb.com'",0);  
  3. </script> 


放在<body></body>之间就可以了!!

顶(1)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论