DOM (Document Object Model) သည် HTML document တစ်ခု၏ object-based representation ဖြစ်သည်။ JavaScript သည် DOM ကိုအသုံးပြုပြီး HTML document ၏ content, structure, နှင့် style များကို ပြောင်းလဲနိုင်သည်။
HTML element တိုင်းသည် DOM ထဲတွင် object (node) တစ်ခုဖြစ်သည်။ JavaScript ဖြင့် ထို object များကို access လုပ်ပြီး manipulate လုပ်နိုင်သည်။
javascript
// The DOM allows JS to interact with the HTML page.
// For example, finding an element and changing its content.
// HTML: <p id="demo"></p>
// JS:
// document.getElementById("demo").innerHTML = "Hello from DOM!";
console.log("This is a conceptual lesson.");You should see
(HTML page ပေါ်ရှိ p element ၏စာသား 'Hello from DOM!' သို့ပြောင်းသွားမည်)