NEW
Font size
WorksheetsOH MY ECMA
Total questions: 44
Worksheet time: 23mins
JavaScript is ______ language.
Scripting
Programming
Both a and b
Application
JavaScript is ______ Side scripting language.
Server
Client
ISP
Browser
The behaviour of the document elements can be defined by
Using document object
Registering appropriate event handlers
Using element object
All of the mentioned
The service(s) that enables networking through scripted HTTP requests is
XMLHttpResponse
XMLRequest
XMLHttpRequest
All of the mentioned
The HTML5 specification includes
Data storage
Graphics APIs
Other APIs for web apps
All of the mentioned
JavaScript code between a pair of “script” tags are called
Non-inline
External
Referenced
Inline
Client-side JavaScript code is embedded within HTML documents in
A URL that uses the special javascript:encoding
A URL that uses the special javascript:stack
A URL that uses the special javascript:protocol
A URL that uses the special javascript:code
What is the programming philosophy that argues that content and behaviour should as much as possible be kept separate?
Unobtrusive JavaScript
Obtrusive JavaScript
Inherited JavaScript
Modular JavaScript
Which of the following communicates with server-side CGI
scripts through HTML form submissions and can be written without the use
of JavaScript?
Static Web Pages
Interactive Web Pages
Conditional Web Pages
None of the mentioned
______ tag is an extension to HTML that can enclose any number of JavaScript statements.
<SCRIPT>
<BODY>
<HEAD>
<TITLE>
How does JavaScript store dates in a date object?
The number of milliseconds since January 1st, 1970
The number of days since January 1st, 1900
The number of seconds since Netscape's public stock offering.
None of the above
Which of the following attribute can hold the JavaScript version?
LANGUAGE
SCRIPT
VERSION
None Of The Above
What is the correct JavaScript syntax to write "Hello World"?
System.out.println("Hello World")
println ("Hello World")
document.write("Hello World")
response.write("Hello World")
Inside which HTML element do we put the JavaScript?
<js>
<scripting>
<script>
<javascript>
What is the correct syntax for referring to an external script called " abc.js"?
<script href=" abc.js">
<script name=" abc.js">
<script src=" abc.js">
None of the above
Which types of image maps can be used with JavaScript?
Server-side image maps
Client-side image maps
Server-side image maps and Client-side image maps
None of the above
Which is the correct way to write a JavaScript array?
var txt = new Array(1:"tim",2:"kim",3:"jim")
var txt = new Array:1=("tim")2=("kim")3=("jim")
var txt = new Array("tim","kim","jim")
var txt = new Array="tim","kim","jim"
What does the <noscript> tag do?
Enclose text to be displayed by non-JavaScript browsers.
Prevents scripts on the page from executing.
Describes certain low-budget movies.
None of the above
If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?
"New Text"?
para1.value="New Text";
para1.firstChild.nodeValue= "New Text";
para1.nodeValue="New Text";
JavaScript entities start with _______ and end with _________.
Semicolon, colon
Semicolon, Ampersand
Ampersand, colon
Ampersand, semicolon
Which of the following best describes JavaScript?
a low-level programming language.
a scripting language precompiled in the browser.
a compiled scripting language.
an object-oriented scripting language.
Choose the server-side JavaScript object?
FileUpLoad
Function
File
Date
Choose the client-side JavaScript object?
Database
Cursor
Client
FileUpLoad
Which of the following is not considered a JavaScript operator?
new
this
delete
typeof
______method evaluates a string of JavaScript code in the context of the specified object.
Eval
ParseInt
ParseFloat
Efloat
Which of the following event fires when the form element
loses the focus: <button>, <input>, <label>,
<select>, <textarea>?
onfocus
onblur
onclick
ondblclick
JavaScript is interpreted by ______.
Client
Server
Object
None of the above
Using _______ statement is how you test for a specific condition.
Select
If
Switch
For
How to create a Date object in JavaScript?
dateObjectName = new Date([parameters])
dateObjectName.new Date([parameters])
dateObjectName := new Date([parameters])
dateObjectName Date([parameters])
To set up the window to capture all Click events, we use which of the following statement?
window.captureEvents(Event.CLICK);
window.handleEvents (Event.CLICK);
window.routeEvents(Event.CLICK );
window.raiseEvents(Event.CLICK );
How does one detach an event listener added to a html element?
element.detachEventListener("event",callback)
element.deleteEventListener("event",callback)
element.removeEventListener("event",callback)
element.addEventListener("event",null)
What is the storage data type of localStorage/sessionStorage?
JSON
String
Array
Heap
Which of the following is not a available methods of localStorage/sessionStorage?
addItem(key,value)
setItem(key,value)
getItem(key,value)
clear()
Which is not on of the types of Pop up boxes available in JavaScript?
Prompt
Alert
Confirm
Dialog
Which of these tags don't go in the head tag in html?
marquee
link
script
meta
______ JavaScript is also called client-side JavaScript.
Microsoft
Navigator
LiveWire
Native
Which of the following are capabilities of functions in JavaScript?
Return a value
Accept parameters and Return a value
Accept parameters
None of the above
The JavaScript exception is available to the Java code as an instance of __________
netscape.javascript.JSObject
netscape.javascript.JSException
netscape.plugin.JSException
None of the above
The _______ method of an Array object adds and/or removes elements from an array.
Reverse
Shift
Slice
Splice
Which of the following event fires when the form element loses the focus: <button>, <input>, <label>, <select>, <textarea>?
onfocus
onblur
onclick
ondblclick
If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?
"New Text"?
para1.value="New Text";
para1.firstChild.nodeValue= "New Text";
para1.nodeValue="New Text";
Predict the output of the following JavaScript code.
<script type="text/javascript" language="javascript">
var x=5;
var y=6;
var res=eval("x*y");
document.write(res);
</script>
“30”
30
5*6
“5*6”
Which of the following is not a reserved word in JavaScript?
interface
throws
program
short
Numeric array values can be sorted through an array method named as
sort()
length.sort()
reverse()
compare()
