woff 發表於 2010-9-14 12:08:21

幾種網頁轉址的語法

HTML<head> <meta http-equiv=refresh content="0;url=http://host.domain.tld/path/to/"> </head>JavaScript<script language="JavaScript">
<!--
window.location.href = "http://host.domain.tld/path/to/";
//-->
</script>PHP<?php
header("Location: http://host.domain.tld/path/to/");
?>(轉址前不可有任何資料輸出)Perl#!/usr/bin/perl -w
print "Location: http://host.domain.tld/path/to/ \n\n";(轉址前不可有任何資料輸出)Perl – 使用 CGI 模組#!/usr/bin/perl -w
use CGI qw/:standard/;
my $CGI = CGI->new();
print $CGI->redirect("http://host.domain.tld/path/to/");

wen2431 發表於 2013-11-14 00:43:30

拿分走人呵呵,樓下繼續!

Vinegar70 發表於 2013-11-14 00:43:30

天啊.

jj668 發表於 2013-11-14 00:43:30

知道了 不錯~~~

cbzdy 發表於 2014-7-2 06:59:45

回复一下吧











bjcars.net

+赤月冥静 發表於 2014-10-29 02:03:57

谢谢分享!!
爱美肌aimgam.com/
頁: [1]
查看完整版本: 幾種網頁轉址的語法