JavaScript Reference/Javascript Properties/httpEquiv

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

"httpEquiv" Example

    
<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>



"httpEquiv" is applied to

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



"httpEquiv" Syntax and Note

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