JavaScript Reference/Javascript Properties/httpEquiv

Материал из Web эксперт
Перейти к: навигация, поиск

"httpEquiv" Example

   <source lang="javascript">
   

<html> <meta id="myM"> <head> <script language="JavaScript"> function function1() {

  document.all.myM.httpEquiv = "refresh";
  document.all.myM.content = 3; 

} </script> </head> <body> <input type="button" value="Refresh this page every 3 seconds." onClick="function1();"> </body> </html>


     </source>
   
  


"httpEquiv" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<meta> | +----------------+--------------------------------------------------------------+

     </source>
   
  


"httpEquiv" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Specifies the binding of <meta> content to an HTTP response header.

Syntax:

document.getElementById("metaID").httpEquiv = value document.all.metaID.httpEquiv = value // IE only


     </source>