Đối tượng meta DOM HTML
Đối tượng meta
Đối tượng Meta đại diện cho phần tử HTML <meta>.
Truy cập một đối tượng Meta
Bạn có thể truy cập phần tử <meta> bằng cách sử dụng getElementsByTagName():
var x = document.getElementsByTagName("META")[0]; Hãy tự mình thử »
Tạo một đối tượng Meta
Bạn có thể tạo phần tử <meta> bằng cách sử dụng phương thức document.createElement():
Thuộc tính đối tượng meta
Property | Description |
---|---|
content | Sets or returns the value of the content attribute of a meta element |
httpEquiv | Sets or returns an HTTP header for the information in the content attribute |
name | Sets or returns a name for the information in the content attribute |
scheme | Not supported in HTML5. Sets or returns how the value of the content attribute should be interpreted |
Thuộc tính và sự kiện tiêu chuẩn
Đối tượng Meta cũng hỗ trợ các thuộc tính và sự kiện tiêu chuẩn.
Trang liên quan
Tham chiếu HTML: thẻ HTML <meta>