onchange
onsubmit
oninput
onreset
onblur
onfocus
onclick
hasChildNodes()
childNodes
children
hasChildren()
To Perform Server Side Scripting Opertion
To Execute Query Related to DB on Server
To add interactivity to HTML Pages
To Style HTML Pages
onerror
onexception
onwarning
onfail
upload
load
onmouseout
onmouseover
Access databases directly
Reduce server load and increase interactivity
Compile HTML code
Replace server-side scripting
When the function is defined as a looping statement
When the function is defined as expressions
When the function is predefined
All of the above
onsize
onresize
onzoom
onexpand
push()
pop()
shift()
unshift()
element.addEvent()
element.addEventListener()
element.attachEvent()
element.onEvent()
getElement(id)
getElementById(id)
getElementById()
elementById(id)
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.
element.getChildren()
element.childNodes
element.getElementsByTagName()
element.getChildNodes()
remove()
delete()
onmove
onscroll
wait()
pause()
setTimeout()
setInterval()
innerHTML
innerText
textContent
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
document.getElementByClassName()
document.getElementsByClassName()
document.querySelectorAll(".class")
Both b and c
replaceNode()
replaceElement()
replaceChild()
replaceWith()
onkeydown
onkeypress
oncontextmenu
onmousedown
onrightclick
onselect
To style HTML Pages
To perform server-side scripting operation
To execute query related to DB on server
element.background = "red";
element.style.backgroundColor = "red";
element.style.background = "red";
element.css.backgroundColor = "red";
LimeScript
ECMScript
Coffee Script
ECMAScript
removeAttr()
deleteAttribute()
removeAttribute()
deleteAttr()
document.getElementByTagName()
document.getElementsByTagName()
document.querySelectorAll()
document.tagName()
onkeyup
onkeyrelease
onload
DOMContentLoaded
onstart
oninit
classList.add()
classList.remove()
classList.toggle()
classList.replace()
stopImmediatePropagation()
preventDefault()
stopPropagation()
cancelPropagation()
getElementByTagName()
getElementByClass()
querySelector()
onedit
onupdate
insertBefore()
insertPrevious()
appendBefore()
addBefore()
onprogress
oncomplete
.html
.java
.js
.css
element.addEventListener("click", function);
element.addEventHandler("click", function);
element.attach("click", function);
element.on("click", function);
insertAfter()
appendChild()
prependChild()
Microsoft
Sun Microsystems
Netscape
Oracle
element.innerHTML
element.value
element.content
element.innerText
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
getElement()
getId()
queryElement()
Client Side
Server Side
Both A and B
None of These
CSS
Python
HTML
JavaScript
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