HTML DOM Dialog Object
Dialog Object
Dialog object သည် HTML <dialog> element ကို ကိုယ်စားပြုသည်။
မှတ်ချက်- <dialog> အစိတ်အပိုင်းကို လက်ရှိတွင် Chrome 37+၊ Safari 6+ နှင့် Opera 24+ တွင်သာ ပံ့ပိုးထားပါသည်။
Dialog Object ကို ဝင်သုံးပါ။
getElementById() ကို အသုံးပြု၍ <dialog> ဒြပ်စင်တစ်ခုကို သင်ဝင်ရောက်နိုင်သည် ။
ဥပမာ
var x = document.getElementById("myDialog");
Dialog Object တစ်ခုကို ဖန်တီးပါ။
document.createElement() နည်းလမ်းကို အသုံးပြု၍ <dialog> element တစ်ခုကို ဖန်တီးနိုင်သည်-
ဥပမာ
var x = document.createElement("DIALOG");
Dialog Object Properties
Property | Description |
---|---|
open | Sets or returns whether a dialog should be open or not |
returnValue | Sets or returns the dialog's return value |
Dialog Object Methods
Method | Description |
---|---|
close() | Closes the dialog |
show() | Shows the dialog |
showModal() | Shows the dialog and makes it the top-most modal dialog |
စံသတ်မှတ်ချက်များနှင့် အစီအစဉ်များ
Dialog object သည် စံ ဂုဏ်သတ္တိများ နှင့် ဖြစ်ရပ်များ ကို ပံ့ပိုး ပေးပါသည်။
ဆက်စပ်စာမျက်နှာများ
HTML ရည်ညွှန်း- HTML <dialog> တဂ်