CSSStyleDeclaration getPropertyPriority () နည်းလမ်း
ဥပမာ
အရောင်ပိုင်ဆိုင်မှုတွင် "အရေးကြီးသည်" ရှိမရှိ ပြန်ပေးပါ။ ဦးစားပေးသတ်မှတ်သည်-
var declaration = document.styleSheets[0].cssRules[0].style;
var
priority = declaration.getPropertyPriority("color");
alert(priority);
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
getPropertyPriority() နည်းလမ်းသည် သတ်မှတ်ထားသော CSS ပိုင်ဆိုင်မှုတွင် "အရေးကြီးသည်!" ဦးစားပေးသတ်မှတ်ထားသည်။
ဤနည်းလမ်းသည် "အရေးကြီးသည်" ပြန်လာပါက၊ အရေးကြီးသော အရည်အချင်းသတ်မှတ်ချက်ကို သတ်မှတ်သည်။
ဤနည်းလမ်းသည် ဗလာစာကြောင်းကို ပြန်ပေးမည်ဆိုပါက၊ အရေးကြီးသော အရည်အချင်းသတ်မှတ်ချက်ကို မသတ်မှတ်ပါ။
Browser ပံ့ပိုးမှု
Method | |||||
---|---|---|---|---|---|
getPropertyPriority() | Yes | 9.0 | Yes | Yes | Yes |
အထားအသို
object.getPropertyPriority(propertyname)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
propertyname | Required. A String representing the name of the property to check |
နည်းပညာဆိုင်ရာအသေးစိတ်
DOM ဗားရှင်း- | CSS Object Model |
---|---|
ပြန်ပို့တန်ဖိုး- | ဦးစားပေးကို ကိုယ်စားပြုသော စာကြောင်းတစ်ခု သို့မဟုတ် ၎င်းတွင်မရှိပါက အလွတ်စာကြောင်းတစ်ခု |
❮ CSSStyle Declaration Object