一、HTML中的<Meta>標簽:
HTML also includes a meta element that goes inside the head element. The purpose of the meta element is to provide meta-information about the document.
Most often the meta element is used to provide information that is relevant to browsers or search engines like describing the content of your document.
二、利用HTML中的<Meta>標簽進行自動刷新或重定向:
W3C states that "Some user agents support the use of META to refresh the current page after a specified number of seconds, with the option of replacing it by a different URI. Authors should not use this technique to forward users to different pages, as this makes the page inaccessible to some users. Instead, automatic page forwarding should be done using server-side redirects"
備注:有些瀏覽器支持通過在頁面使用<META>標簽來定時刷新頁面,或者將用戶重定向到另外的URL,W3C不提倡這種做法,因為這可能導致某些用戶頁面無法訪問。頁面的重定向應該在服務器端完成。
<head>
<meta http-equiv="Refresh" content="5;url=http://www.tkk7.com/pengpenglin">
</head>
請注意上面<meta>標簽中的"http-equiv"屬性值為:Refresh,這告訴瀏覽器要定時刷新頁面,而content中的5則指定每隔多長時間刷新一次頁面(以秒為單位),url屬性則指明在刷新時瀏覽器重定向到的地址,這里也可以是本頁面。
-------------------------------------------------------------
生活就像打牌,不是要抓一手好牌,而是要盡力打好一手爛牌。
posted on 2008-06-22 18:54
Paul Lin 閱讀(351)
評論(0) 編輯 收藏 所屬分類:
Web基礎