Slide 1 lt pgtSample ltbgtboldltbgt displayltpgt P B text text nextSibling prevSibling nextSibling prevSibling firstChild lastChild parentNode parentNode parentNode ID: 458436
Download Presentation The PPT/PDF document "CS 142 Lecture Notes: DOM" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
CS 142 Lecture Notes: DOM
Slide 1
<p>Sample <b>bold</b> display</p>
P
B
#text
#text
nextSibling
prevSibling
nextSibling
prevSibling
firstChild
lastChild
parentNode
parentNode
parentNode
Sample
display
#text
bold
firstChild,
lastChild
parentNode
nodeName
property
nodeValue
propertySlide2
CS 142 Lecture Notes: DOM
Slide 2
DOM Coordinates
x
y
offsetParent
offsetParent
offsetTop
offsetLeft
offsetLeft
offsetTop
offsetWidth
offsetHeight
div1
div2
div3Slide3
CS 142 Lecture Notes: DOMSlide 3Positioning Children
Parent borderParent margin
Parent padding
Child margin
Child border
top/
offsetTop
left/
offsetLeftSlide4
CS 142 Lecture Notes: DOMSlide 4Slide5
CS 142 Lecture Notes: DOM
Slide 5
Dialogsalert
("Please click to continue");if (
confirm("Are you sure you want ...?") { ...
}
name = prompt("Enter username here:");