jQuery append() နည်းလမ်း
❮ jQuery HTML/CSS နည်းလမ်းများ
ဥပမာ
<p> အစိတ်အပိုင်းအားလုံး၏အဆုံးတွင် အကြောင်းအရာကို ထည့်သွင်းပါ-
$("button").click(function(){
$("p").append("<b>Appended text</b>");
});
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
append() method သည် ရွေးချယ်ထားသော အစိတ်အပိုင်းများ၏ အဆုံးတွင် သတ်မှတ်ထားသော အကြောင်းအရာကို ထည့်သွင်းသည်။
အကြံပြုချက်- ရွေးချယ်ထားသော အစိတ်အပိုင်းများ၏ အစတွင် အကြောင်းအရာကို ထည့်သွင်းရန်၊ prepend() နည်းလမ်းကို အသုံးပြုပါ။
အထားအသို
$(selector).append(content,function(index,html))
Parameter | Description |
---|---|
content | Required. Specifies the content to insert (can contain HTML tags)
Possible values:
|
function(index,html) | Optional. Specifies a function that returns the content to insert
|
သင်ကိုယ်တိုင်စမ်းကြည့်ပါ - ဥပမာများ
ဖြင့် အကြောင်းအရာကို append() နည်းလမ်းဖြင့် အကြောင်းအရာကို ဖန်တီးပါ။
ရွေးချယ်ထားသောဒြပ်စင်များ၏အဆုံးတွင် အကြောင်းအရာထည့်သွင်းရန် လုပ်ဆောင်ချက်တစ်ခုကို အသုံးပြုခြင်းဖြင့် အကြောင်းအရာကို ပေါင်းထည့်ပါ
❮ jQuery HTML/CSS နည်းလမ်းများ