1 / 7

Document Object Model

Document Object Model. Nasrullah. DOM. When a page is loaded ,browser creates a Document Object Model of the Page. DOM. Java script. JavaScript can change all the HTML elements in the page JavaScript can change all the HTML attributes in the page

ossie
Télécharger la présentation

Document Object Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Document Object Model Nasrullah

  2. DOM • When a page is loaded ,browser creates a Document Object Model of the Page.

  3. DOM

  4. Java script • JavaScript can change all the HTML elements in the page • JavaScript can change all the HTML attributes in the page • JavaScript can change all the CSS styles in the page • JavaScript can react to all the events in the page

  5. Finding HTML elements • Finding HTML elements by id • Finding HTML elements by tag name • Finding HTML elements by class name

  6. Finding HTML Elements by Id • The easiest way to find HTML elements in the DOM, is by using the element id. • Complete the Assignment at wiki and submit it in next class

  7. HTML DOM EVENTS HTML DOM allows JavaScript to react to HTML events. HTML events • When a user clicks the mouse • When a web page has loaded • When an image has been loaded • When the mouse moves over an element • When an input field is changed • When an HTML form is submitted • When a user strokes a key

More Related