Page 221 - Web Applications (803) Class 12
P. 221
Solved Exercise
Section A
(Objective Type Questions)
A. Choose the correct option.
1. Give the output of the following code snippet:
x=4+5*12%2;
switch(x)
{ case 2: document.write("Low Value");
case 4: document.write("Medium Value");
case 6: document.write("High Value");
}
i. Medium Value ii. Medium ValueHigh Value
iii. Medium Value iv. Error
2. DOM stands for ................................
i. Document Open Model ii. Draft Object Model
iii. Document Object Model iv. Draft Open Model
3. In JavaScript, any object of any type can be assigned to any ................................
i. object ii. loop
iii. HTML form iv. variable
4. When a user enters inaccurate information, the developer can utilise ............................... to show the user a warning
or error.
i. alert box ii. prompt box
iii. input box iv. None of these
5. ................................ inbuilt function returns an arbitrary value between 0 and 1.
i. randint( ) ii. randfloat( )
iii. random( ) iv. Floor( )
6. The act of responding to events is known as ................................
i. prompt handling ii. event handling
iii. programming iv. event handler
7. The ............................... inbuilt JavaScript function converts a string into an integer.
i. string ii. len
iii. parseInt iv. random
8. ............................... is a special variable, with the capacity to hold several values.
i. Function ii. Constant
iii. Loop iv. Array
9. Which of the following is NOT an event?
i. load ii. mouseover
iii. onunload iv. submit
Web Scripting—JavaScript 219

