HTML DOM Meta Object
Meta Object
วัตถุ Meta แสดงถึงองค์ประกอบ HTML <meta>
เข้าถึง Meta Object
คุณสามารถเข้าถึง <meta> องค์ประกอบโดยใช้ getElementsByTagName():
var x = document.getElementsByTagName("META")[0];
สร้าง Meta Object
คุณสามารถสร้าง <meta> องค์ประกอบโดยใช้ document.createElement() วิธีการ:
ตัวอย่าง
var x = document.createElement("META");
คุณสมบัติ Meta Object
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 |
คุณสมบัติและเหตุการณ์มาตรฐาน
ออบเจ็กต์ Meta ยังสนับสนุนคุณสมบัติและเหตุการณ์ มาตรฐาน อีกด้วย
หน้าที่เกี่ยวข้อง
การอ้างอิง HTML: แท็ก HTML <meta>