Textarea defaultValue Property
ဥပမာ
စာသားဧရိယာ၏ မူရင်းတန်ဖိုးကို ပြောင်းပါ-
document.getElementById("myTextarea").defaultValue = "Fifth Avenue, New York City";
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
မူရင်းတန်ဖိုးသည် စာသားဧရိယာတစ်ခု၏ ပုံသေတန်ဖိုးကို သတ်မှတ်ပေးသည် သို့မဟုတ် ပြန်ပေးသည်။
မှတ်ချက်- စာသားဧရိယာ၏ မူရင်းတန်ဖိုးမှာ <textarea> နှင့် </textarea> တဂ်များကြားရှိ စာသားဖြစ်သည်။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
defaultValue | Yes | Yes | Yes | Yes | Yes |
အထားအသို
မူရင်းတန်ဖိုးပိုင်ဆိုင်မှုကို ပြန်ပို့ပါ-
textareaObject.defaultValue
မူရင်းတန်ဖိုးကို သတ်မှတ်ပါ-
textareaObject.defaultValue = text
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
text | Specifies the default value (contents) of the text area |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | စာသားဧရိယာ၏ မူရင်းတန်ဖိုးကို ကိုယ်စားပြုသော စာကြောင်းတစ်ခု |
---|
နောက်ထပ် ဥပမာများ
ဥပမာ
စာသားဧရိယာ၏ မူရင်းတန်ဖိုးကို ရယူပါ-
var x = document.getElementById("myTextarea").defaultValue;
❮ Textarea အရာဝတ္ထု