TShopping

 找回密碼
 註冊
搜索
查看: 6697|回復: 5

[教學] 幾種網頁轉址的語法

  [複製鏈接]
發表於 2010-9-14 12:08:21 | 顯示全部樓層 |閱讀模式
 
Push to Facebook
HTML
  1. <head> <meta http-equiv=refresh content="0;url=http://host.domain.tld/path/to/"> </head>
複製代碼
JavaScript
  1. <script language="JavaScript">
  2. <!--
  3.   window.location.href = "http://host.domain.tld/path/to/";
  4. //-->
  5. </script>
複製代碼
PHP
  1. <?php
  2.   header("Location: http://host.domain.tld/path/to/");
  3. ?>
複製代碼
(轉址前不可有任何資料輸出)Perl
  1. #!/usr/bin/perl -w
  2. print "Location: http://host.domain.tld/path/to/ \n\n";
複製代碼
(轉址前不可有任何資料輸出)Perl – 使用 CGI 模組
  1. #!/usr/bin/perl -w
  2. use CGI qw/:standard/;
  3. my $CGI = CGI->new();
  4. print $CGI->redirect("http://host.domain.tld/path/to/");
複製代碼

 

臉書網友討論
發表於 2013-11-14 00:43:30 | 顯示全部樓層
拿分走人呵呵,樓下繼續!

版主招募中

發表於 2013-11-14 00:43:30 | 顯示全部樓層
天啊.  


發表於 2013-11-14 00:43:30 | 顯示全部樓層
知道了 不錯~~~  


發表於 2014-7-2 06:59:45 | 顯示全部樓層
回复一下吧











bjcars.net


發表於 2014-10-29 02:03:57 | 顯示全部樓層
谢谢分享!!
爱美肌aimgam.com/


*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-3-29 10:01 , Processed in 0.110445 second(s), 19 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表