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