posts - 262,  comments - 221,  trackbacks - 0
一、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.blogjava.net/pengpenglin">
</head>


请注意上面<meta>标签中的"http-equiv"属性值为:Refresh,这告诉浏览器要定时刷新页面,而content中的5则指定每隔多长时间刷新一次页面(以秒为单位),url属性则指明在刷新时浏览器重定向到的地址,这里也可以是本页面。



-------------------------------------------------------------
生活就像打牌,不是要抓一手好牌,而是要尽力打好一手烂牌。
posted on 2008-06-22 18:54 Paul Lin 阅读(330) 评论(0)  编辑  收藏 所属分类: Web基础

只有注册用户登录后才能发表评论。


网站导航:
 
<2008年6月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

常用链接

留言簿(21)

随笔分类

随笔档案

BlogJava热点博客

好友博客

搜索

  •  

最新评论

阅读排行榜

评论排行榜