HTML DOM httpEquiv 属性

定义和用法

httpEquiv 属性把 content 属性连接到 HTTP 头部。

语法

  1. metaObject.httpEquiv=content-type|expires|refresh|set-cookie

实例

本例每 5 秒刷新页面:

  1. <html>
  2. <head>
  3. <meta http-equiv="refresh" content="5" />
  4. </head>
  5. <body>
  6.  
  7. <script type="text/javascript">
  8. x=document.getElementsByTagName("meta")[0];
  9. document.write("Http equiv: " + x.httpEquiv);
  10. </script>
  11.  
  12. </body>
  13. </html>