X
    Categories: Program

自動轉址寫法

網頁自動轉址.. 每次想到都要去找..
不如直接貼過來算了 .. ^^;


a,b 轉載自 : Openwebmail FAQ
a.
----------------------------------------
<html><head>
<meta http-equiv="Refresh"
content="0;URL=http://your_server/cgi-bin/openwebmail/openwebmail.pl">
</head></html>
----------------------------------------
b.
---------------------------------------
<html>
<body onload=
"window.open('http://your_server/cgi-bin/openwebmail/openwebmail.pl','_top')">
</body>
</html>
----------------------------------------
以下是其它寫法 (非Html)
----------------------------------------
c. PHP header 寫法
---------------------------------------
header("Location: https://fgps.tcc.edu.tw/cgi-bin/openwebmail/openwebmail.pl");
---------------------------------------
d. JavaScript 寫法
---------------------------------------
<script language="Javascript">
<!--
if (screen.width == "800")
{
location="fgps/800/index.php?link=index"
}
else
{
location="fgps/1024/index.php?link=index"
}
//-->
</script>
---------------------------------------

Tsung: 對新奇的事物都很有興趣, 喜歡簡單的東西, 過簡單的生活.
Related Post