Javascript Bom

BOM ရဲ့အရှည်ကောက်ကတော့ Browser Object Model ပဲဖြစ်ပါတယ်။ ဘယ်မှာအသုံးများလဲဆိုတော့ javascript ကိုအသုံးပြုပြီး browser တွေနဲ့ communicate လုပ်တဲ့နေရာမှာသုံးပါတယ်။ Bom ကိုအသုံးပြုမယ်ဆို window နဲ့စရပါတယ်။


Screen နဲ့ပက်သက်တဲ့ properties တွေပါ။ console မှာ window.screen.property နဲ့ စမ်းကြည့်ပါ။ ဉပမ window.screen.colorDepth


Navigator နဲ့ပက်သက်တဲ့ properties တွေပါ။ ဉပမာ window.navigator.language


location နဲ့ပက်သက်တဲ့ properties တွေပါ။ ဉပမာ window.location.origin


History နဲ့ပက်သက်တဲ့ properties တွေပါ။ history object ကဘာအတွက်သုံးလဲဆိုတော့ user visited url တွေကိုအသုံးပြုတဲ့အခါသုံးပါတယ်။ ဉပမာ window.history.go(-2)

source from internet and w3schools.com

Popular posts from this blog

Data Structure introduction

Algorithm basic examples

Dom introduction