JavaScript isn't enabled in your browser, so this file can't be opened. Enable and reload.
JavaScript Quiz
Sign in to Google
to save your progress.
Learn more
Inside which HTML element do we put the JavaScript?
5 points
<js>
<scripting>
<script>
<javascript>
Clear selection
What is the correct JavaScript syntax to change the content of the HTML element below? <p id="demo">This is a demonstration.</p>
5 points
document.getElement("p").innerHTML = "HELLO";
document.getElementByName("p").innerHTML = "HELLO";
document.getElementById("p").innerHTML = "HELLO";
#demo.innerHTML = "HELLO";
Clear selection
Where is the correct place to insert a JavaScript?
5 points
The <head> section
Both the <head> section and the <body> section are correct
The <body> section
Clear selection
What is the correct syntax for referring to an external script called "xxx.js"?
5 points
<script src = "xxx.js">
<script name = "xxx.js">
<script href = "xxx.js">
Clear selection
The external javascript must contain script tag
5 points
True
False
Clear selection
How do you write "Hello World" in an alert box?
5 points
msgBox("Hello World")
alertBox("Hello World")
alert("Hello World")
console.write("Hello World")
Clear selection
How do you create a function in JavaScript?
5 points
function myfunction;
function myfunction()
myfunction()
function = myfunction()
Clear selection
Submit
Clear form
Forms
This content is neither created nor endorsed by Google.
Report Abuse
Terms of Service
Privacy Policy
Help and feedback
Contact form owner
Help Forms improve
Report