Correct Answer: Creating animations and other visual effects
Notes: Answer: a
Explanation: JavaScript can help to facilitate that experience, for example by:
Creating animations and other visual effects to subtly guide a user and help with page navigation
Sorting the columns of a table to make it easier for a user to find what she needs
302). A JavaScript program can traverse and manipulate document content through __________
[A]Element Object [B]Document Object [C]Both Element and Document Object [D] Data object
Notes: Answer: c
Explanation: A JavaScript program can traverse and manipulate document content through the Document object and the Element objects it contains. It can alter the presentation of that content by scripting CSS styles and classes. The Element object represents an HTML element, like P, DIV, A, TABLE, or any other HTML element.
303). The behaviour of the document elements can be defined by __________
[A]Using document object [B]Registering appropriate event handlers [C]Using element object [D]Using data element
Notes: Answer: b
Explanation: The JavaScript program can define the behavior of document elements by registering appropriate event handlers. A JavaScript program can traverse and manipulate document content through the Document object and the Element objects it contains.
304). The service(s) that enables networking through scripted HTTP requests is __________
Notes: Answer: c
Explanation: The best known advanced services is the XMLHttpRequest object, which enables networking through scripted HTTP requests. The XMLHttpRequest object can be used to request data from a web server.
305). The HTML5 specification does not includes __________
[A]Data storage [B] Graphics APIs [C]Other APIs for web apps [D] Networking
Notes: Answer: d
Explanation: The HTML5 specification (which, at the time of this writing, is still in draft form) and related specifications are defining a number of other important APIs for web apps. These include data storage and graphics APIs.The data storage api can store data locally within the user’s browser.
306). Which of the following is not an advanced services?
[A] Data storage [B]Networking [C]XMLHttpRequest object [D]Graphics APIs
Notes: Answer: d
Explanation: Data storage is used to store data locally on user’s computer and networking is used for connecting between different platforms.
307). JavaScript code between a pair of “script” tags are called __________
Correct Answer: A URL that uses the special javascript:protocol
Notes: Answer: c
Explanation: The Client-side JavaScript code is embedded within HTML documents in four ways :
Inline, between a pair of “script” tags
From an external file specified by the src attribute of a “script” tag
In an HTML event handler attribute, such as onclick or onmouseover
In a URL that uses the special javascript: protocol.
309). What is the programming philosophy that argues that content and behaviour should as much as possible be kept separate?
Notes: Answer: a
Explanation: A programming philosophy known as unobtrusive JavaScript argues that content (HTML) and behavior (JavaScript code) should as much as possible be kept separate. According to this programming philosophy, JavaScript is best embedded in HTML documents using “script” elements with src attributes.
310). Which of the following communicates with server-side CGI scripts through HTML form submissions and can be written without the use of JavaScript?
[A]Static Web Pages [B]Interactive Web Pages [C]Conditional Web Pages [D] All web pages
Notes: Answer: b
Explanation: An interactive web page can dynamically vary its content based on user preferences. Interactive web pages that communicate with server-side CGI scripts through HTML form submissions were the original “web application” and can be written without the use of JavaScript.