Area coords အိမ်ခြံမြေ
ဥပမာ
ပုံ-မြေပုံတစ်ခုရှိ သီးခြားဧရိယာအတွက် သြဒိနိတ်များကို ရယူပါ-
var x = document.getElementById("venus").coords;
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
coords ပိုင်ဆိုင်မှုသည် ဧရိယာတစ်ခု၏ coords attribute ၏တန်ဖိုးကို သတ်မှတ်ပေးသည် သို့မဟုတ် ပြန်ပေးသည်။
coords attribute သည် ဧရိယာတစ်ခု၏ x နှင့် y သြဒိနိတ်များကို သတ်မှတ်ပေးသည်။
ဧရိယာတစ်ခု၏ အရွယ်အစား၊ ပုံသဏ္ဍာန်နှင့် နေရာချထားမှုတို့ကို သတ်မှတ်ရန်အတွက် coords attribute ကို ပုံသဏ္ဍာန် ရည်ညွှန်းချက်နှင့် တွဲသုံးပါသည်။
အကြံပြုချက်- ဧရိယာတစ်ခု၏ ဘယ်ဘက်အပေါ်ထောင့်၏ သြဒီနိတ်များသည် 0.0 ဖြစ်သည်။
အကြံပြုချက်- ဧရိယာတစ်ခု၏ ပုံသဏ္ဍာန်ရည်ညွှန်းချက်တန်ဖိုးကို သတ်မှတ်ရန် သို့မဟုတ် ပြန်ပေးရန်အတွက် ပုံသဏ္ဍာန် ပိုင်ဆိုင်မှုကို အသုံးပြုပါ ။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
coords | Yes | Yes | Yes | Yes | Yes |
အထားအသို
ကြိုးများပိုင်ဆိုင်မှုကို ပြန်ပေးပါ-
areaObject.coords
ကြိုးများကို သတ်မှတ်ပါ-
areaObject.coords = value
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
x1, y1, x2, y2 | If the shape attribute is set to "rect", it specifies the coordinates of the top-left corner and the bottom-right corner of the rectangle |
x, y, radius | If the shape attribute is set to "circle", it specifies the coordinates of the circle center and the radius |
x1, y1, x2, y2, .., xn, yn | If the shape attribute is set to "poly", it specifies the coordinates of the edges of the polygon. If the first and last coordinate pairs are not the same, the browser must add the last coordinate pair to close the polygon |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | ကော်မာ-ခြားထားသော သြဒိနိတ်များစာရင်းကို ကိုယ်စားပြုသည့် စာတန်း |
---|
နောက်ထပ် ဥပမာများ
ဥပမာ
ပုံ-မြေပုံတစ်ခုရှိ သီးခြားဧရိယာအတွက် သြဒီနိတ်များကို ပြောင်းပါ-
document.getElementById("venus").coords = "90, 58, 3";
ဆက်စပ်စာမျက်နှာများ
HTML ရည်ညွှန်းချက်- HTML <area> coords ရည်ညွှန်းချက်
❮ ဧရိယာအရာဝတ္ထု