Meta httpEquiv Property
ဥပမာ
အကြောင်းအရာရည်ညွှန်းချက်ရှိ အချက်အလက်အတွက် HTTP ခေါင်းစီးကို ပြန်ပေးပါ။
var x = document.getElementsByTagName("META")[0].httpEquiv;
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
httpEquiv ပိုင်ဆိုင်မှုသည် အကြောင်းအရာရည်ညွှန်းချက်ရှိ အချက်အလက်အတွက် HTTP ခေါင်းစီးကို သတ်မှတ် သို့မဟုတ် ပြန်ပေးသည်။
http-equiv attribute ကို HTTP တုံ့ပြန်မှု ခေါင်းစီးကို အတုယူရန် အသုံးပြုနိုင်သည်။
http-equiv attribute ၏တန်ဖိုးသည် content attribute ၏တန်ဖိုးပေါ်တွင်မူတည်သည်။
မှတ်ချက်- အမည် attribute ကို သတ်မှတ်ပါက၊ http-equiv attribute ကို မသတ်မှတ်သင့်ပါ။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
httpEquiv | Yes | Yes | Yes | Yes | Yes |
အထားအသို
httpEquiv ပိုင်ဆိုင်မှုကို ပြန်ပေးပါ။
metaObject.httpEquiv
httpEquiv ပိုင်ဆိုင်မှုကို သတ်မှတ်ပါ-
metaObject.httpEquiv = HTTP-header
အသုံးများသော HTTP-ခေါင်းစီး တန်ဖိုးအချို့မှာ-
Value | Description |
---|---|
content-type | Specifies the character set for the contents of the document. Tip: It is recommended to always specify the character set. Example: <meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
default-style | Specifies the preferred style sheet to use. Example: <meta http-equiv="default-style" content="the documents preferred stylesheet"> Note: The value of the content attribute above must match the value of the ttitle attribute on a link element in the same document, or it must match the value of the title attribute on a style element in the same document. |
refresh | Defines a time interval for the document to refresh itself.
Example: <meta http-equiv="refresh" content="300"> Note: The value "refresh" should be used carefully, as it takes the control of a page away from the user. Using "refresh" will cause a failure in W3C's Web Content Accessibility Guidelines. |
တန်ဖိုးကို ပြန်ပေးသည်။
Type | Description |
---|---|
String | Information about the HTTP response message header |
နောက်ထပ် ဥပမာများ
ဥပမာ
http-equiv နှင့် အကြောင်းအရာ attribute များ၏ တန်ဖိုးကို ပြောင်းလဲပါ။ အောက်ပါဥပမာသည် စာရွက်စာတမ်းအား စက္ကန့် 30 တိုင်း ပြန်လည်ဆန်းသစ်ပါမည်-
document.getElementsByTagName("META")[0].httpEquiv = "refresh";
document.getElementsByTagName("META")[0].content = "30";
❮ Meta Object