Professional Documents
Culture Documents
WEb Dom
WEb Dom
WEb Dom
<aside>
<details>
<figcaption>
<figure>
<footer>
<header>
<main>
<mark>
<nav>
<section>
<summary>
<time>
• https://www.w3schools.com/css/css_positioning.asp
• Relative
• Absolute
• Similar to relative but doesn’t take into account another content
• Static
• Fixed
Properties
Float
https://www.w3schools.com/css/css_float.asp
Clear
Overflow
https://www.w3schools.com/css/css_overflow.asp
Display
https://www.w3schools.com/cssref/pr_class_display.asp
Visibility
https://www.w3schools.com/cssref/pr_class_visibility.asp
var x = myFunction(4, 3); // Function is called, return value will end up in x
function myFunction(a, b) {
return a * b; // Function returns the product of a and b
}
“shift()” & “pop()” is used to remove an elements from first & last position respectively
“unshift()” & “push()” inserts/adds an element at first and last position respectively
document.getElementsByTagName(name)
document.getElementsByClassName(name)
For example, if you have an “input” element that has the attribute id=“dem” :
[htmlElementObject].[attribute] = [value]
document.getElementById(“dvTitle”).className = “newClass”
[htmlElementObject].setAttribute(attribute, value)
document.getElementById(“dvTitle”).setAttribute(“class”, “newClass”)
[htmlElementObject].style.[property] = [value]
document.getElementById(“dvTitle”).style.color = “red”
setInterval(), continue to execute function/code after specified time until explicitly stopped
You can use the following node properties to navigate between nodes with JavaScript:
• parentNode
• childNodes[nodenumber]
• firstChild
• lastChild
• nextSibling
• previousSibling
You can use the following node properties to navigate between nodes with JavaScript:
parentNode
childNodes[nodenumber]
firstChild
lastChild
nextSibling
previousSibling
• The element node <title> (in the example above) does not contain text.
There are two special properties that allow access to the full document:
document.documentElement - The full document returns the Element that is the root element of the document.
Node Lenght
onmouseenter
onmouseleave
onmouseover
onmouseout
onmousemove
Many more……..
• Input events
• Click Events
• Load Events