JavaScript Reference/Javascript Properties/content

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

"content" Example

    
<html>
<head>
<meta id="myM" http-equiv="Content-Type">
<script language="JavaScript">
document.getElementById("myM").content = "text/html; 
charset=iso-8859-1"
</script>
</head>
</body>
</html>



"content" is applied to

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



"content" Syntax and Note

Note:
Read and write property. 
Specifies the content attribute associated with the http-equiv or 
name attributes of the <meta> element.
    
Syntax:
    
document.getElementById("metaID").content = value
document.all.metaID.content = value // IE only