onload
DOMContentLoaded
onstart
oninit
shift()
pop()
remove()
delete()
onchange
onsubmit
oninput
onreset
onkeypress
onkeydown
onkeyup
onkeyrelease
JavaScript interpreter processes programs written in Java.
JavaScript interpreter processes commands in a script written in JavaScript.
Java and JavaScript are almost similar
JavaScript cannot be embedded in HTML.
hasChildNodes()
childNodes
children
hasChildren()
Client Side
Server Side
Both A and B
None of These
push()
unshift()
removeAttr()
deleteAttribute()
removeAttribute()
deleteAttr()
element.addEventListener("click", function);
element.addEventHandler("click", function);
element.attach("click", function);
element.on("click", function);
onblur fires when an element loses focus, and onfocus fires when an element gains focus
Both events fire when the window is minimized
Both events trigger when the page is loaded
onblur fires when an element is clicked, and onfocus fires when the mouse moves over an element
innerHTML
innerText
textContent
All of the above
.html
.java
.js
.css
element.innerHTML
element.value
element.content
element.innerText
insertBefore()
insertPrevious()
appendBefore()
addBefore()
When the function is defined as a looping statement
When the function is defined as expressions
When the function is predefined
onblur
onfocus
onclick
upload
load
onmouseout
onmouseover
insertAfter()
appendChild()
prependChild()
LimeScript
ECMScript
Coffee Script
ECMAScript
onedit
onupdate
oncontextmenu
onmousedown
onrightclick
onselect
CSS
Python
HTML
JavaScript
onsize
onresize
onzoom
onexpand
document.getElementByClassName()
document.getElementsByClassName()
document.querySelectorAll(".class")
Both b and c
element.background = "red";
element.style.backgroundColor = "red";
element.style.background = "red";
element.css.backgroundColor = "red";
To style HTML Pages
To perform server-side scripting operation
To execute query related to DB on server
To add interactivity to HTML Pages
replaceNode()
replaceElement()
replaceChild()
replaceWith()
Microsoft
Sun Microsystems
Netscape
Oracle
It is triggered when an element is clicked
It is triggered when an element gains focus
It is triggered when an element is hovered
It is triggered when the window is resized
What will the following JavaScript code do?
var element = document.getElementById("myDiv");element.remove();
Remove the element with the ID "myDiv" from the DOM
Remove all child elements inside the element with the ID "myDiv"
Hide the element with the ID "myDiv"
Move the element with the ID "myDiv" to a different location
getElementByTagName()
getElementById()
getElementByClass()
querySelector()
Access databases directly
Reduce server load and increase interactivity
Compile HTML code
Replace server-side scripting
element.getChildren()
element.childNodes
element.getElementsByTagName()
element.getChildNodes()
To Perform Server Side Scripting Opertion
To Execute Query Related to DB on Server
To Style HTML Pages
onmove
onscroll
onerror
onexception
onwarning
onfail
getElement()
getId()
queryElement()
onprogress
oncomplete
stopImmediatePropagation()
preventDefault()
stopPropagation()
cancelPropagation()
classList.add()
classList.remove()
classList.toggle()
classList.replace()
element.addEvent()
element.addEventListener()
element.attachEvent()
element.onEvent()
getElement(id)
getElementById(id)
elementById(id)
document.getElementByTagName()
document.getElementsByTagName()
document.querySelectorAll()
document.tagName()
wait()
pause()
setTimeout()
setInterval()