removeAttr method

removeAttr method သည် အစိတ်အပိုင်းများ၏ attributes များကို ဖျက်ပစ်ပါသည်။

Syntax

javascript$(selector).removeAttr(attribute name);

ဥပမာ

တစ်ခု၏ value attribute ကို ဖျက်ကြည့်ရအောင်-

html<input type="text" value="!!!" id="test">
javascript$('#test').removeAttr('value');

HTML code သည် အောက်ပါအတိုင်း ပြောင်းသွားမည်-

html<input type="text" id="test">

ဆက်လက်လေ့လာရန်

  • attr method,
    အစိတ်အပိုင်းများ၏ attributes များကို ရယူခြင်း၊ ပြင်ဆင်ခြင်း ပြုလုပ်နိုင်ပါသည်။
  • prop method,
    အစိတ်အပိုင်းများ၏ properties များနှင့် အလုပ်လုပ်နိုင်ပါသည်။
  • removeProp method,
    အစိတ်အပိုင်းများ၏ properties များကို ဖျက်ရန် ခွင့်ပြုပါသည်။