jQuery [attribute~=value] ရွေးချယ်မှု
ဥပမာ
သတ်မှတ်ထားသော စကားလုံး "nation" ပါ၀င်သော အမည်ရည်ညွှန်းချက်ဖြင့် <input> အစိတ်အပိုင်းအားလုံးကို ရွေးပါ-
$("input[name~='nation']")
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
[attribute~=value] ရွေးပေးသူသည် သီးခြားစာကြောင်းတစ်ခုပါရှိသော တန်ဖိုးတစ်ခုဖြင့် သီးခြား attribute တစ်ခုစီနှင့် ဒြပ်စင်တစ်ခုစီကို ရွေးချယ်သည်။
အကြံပြုချက်- စာကြောင်းတွင် နေရာလွတ်များ ပါဝင်နိုင်သည်။
အထားအသို
$("[attribute~='value']")
Parameter | Description |
---|---|
attribute | Required. Specifies the attribute to find |
value | Required. Specifies the string value |