ExamVeda
Login
Home
31
The main purpose of JavaScript in web browser is to
Discuss
Answer & Solution
Answer: Option A
Solution:
JavaScript can help to facilitate that experience, for example by:
1. Creating animations and other visual effects to subtly guide a user and help with page navigation
2. Sorting the columns of a table to make it easier for a user to find what she needs
3. Hiding certain content and revealing details progressively as the user “drills down” into that content
32
A JavaScript program can traverse and manipulate document content through
Discuss
Answer & Solution
Answer: Option C
Solution:
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.
33
The behaviour of the document elements can be defined by
Discuss
Answer & Solution
Answer: Option B
Solution:
The JavaScript program can define the behavior of document elements by registering appropriate event handlers.
34
The service(s) that enables networking through scripted HTTP requests is
Discuss
Answer & Solution
Answer: Option C
Solution:
The best known advanced services is the XMLHttpRequest object, which enables networking through scripted HTTP requests.
35
The HTML5 specification includes
Discuss
Answer & Solution
Answer: Option D
Solution:
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 the data storage and graphics APIs.
36
Which of the following are not advanced services?
Discuss
Answer & Solution
Answer: Option D
Solution:
All the above mentioned are advanced services.
37
JavaScript code between a pair of “script” tags are called
Discuss
Answer & Solution
Answer: Option D
Solution:
Inline code are those that are writeen between a pair of “script” tags.
38
Client-side JavaScript code is embedded within HTML documents in
Discuss
Answer & Solution
Answer: Option C
Solution:
The Client-side JavaScript code is embedded within HTML documents in four ways :
1. Inline, between a pair of “script” tags
2. From an external file specified by the src attribute of a “script” tag
3. In an HTML event handler attribute, such as onclick or onmouseover
4. In a URL that uses the special javascript: protocol.
39
What is the programming philosophy that argues that content and behaviour should as much as possible be kept separate?
Discuss
Answer & Solution
Answer: Option A
Solution:
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.
40
Which of the following communicates with server-side CGI scripts through HTML form submissions and can be written without the use of JavaScript?
Discuss
Answer & Solution
Answer: Option B
Solution:
nteractive 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.