What will be done if more than one page requires a file of JavaScript code?
a) Downloads that many times
b) Retrives from the browser cache
c) Must be re executed
d) Must be included in all the pages
Explanation: If a file of JavaScript code is shared by more than one page, it only needs to be downloaded once, by the first page that uses it—subsequent pages can retrieve it from the browser cache. This makes the loading process easier and hence faster.
What is the default value of the type attribute?
a) text/css
b) text/javascript
c) html
d) xml
Explanation: The default value of the type attribute is “text/javascript”. You can specify this type explicitly if you want, but it is never necessary.
The language is commonly used to………..
a) Specify the user’s language
b) Specify the language going to be scripted
c) No longer in use
d) Specify the programmer’s favourable language
Explanation: The language attribute specifies the natural language of the content of a web page. The language attribute is deprecated and should no longer be used.
The word “document” mainly refers to………
a) Dynamic Information
b) Static Information
c) Both Dynamic and Static Information
d) Temporary information
Explanation: Some pages present static information and can be called documents. The document is a keyword which is used in selecting any particular element in the document.
Which object is the main entry point to all client-side JavaScript features and APIs?
a) Standard
b) Location
c) Window
d) Position
Explanation: The Window object is the main entry point to all client-side JavaScript features and APIs. It represents a web browser window or frame, and you can refer to it with the identifier window.
Which identifier is used to represent a web browser window or frame?
a) frames
b) window
c) location
d) frame
Explanation: The window object represents a web browser window or frame, and you can refer to it with the identifier window. Global variables are properties of the window object and Global functions are methods of the window object.