2010-11-17

關於自動轉址

html的寫法

<html>
  <head>
  <meta http-equiv="Refresh" content="0;URL=http://nyo-sutdybook.blogspot.com/">
  </head>
</html>
content裡的0是指幾秒後自動轉址,URL是要轉過去的網址

<html>
  <body onload="window.open('http://nyo-sutdybook.blogspot.com/','_top')">
  </body>
</html>
另一個寫法


PHP的寫法
<?php
header('Location: http://nyo-sutdybook.blogspot.com/');
?>

javascript的寫法
<script>
document.location.href="http://nyo-sutdybook.blogspot.com/";
</script>

沒有留言 :

張貼留言