NIELIT O Level M2-R5 Question Paper with Solution

NIELIT O Level M2-R5 Question Paper with Solution

31-To automatically open the console when a JavaScript error occurs which of the following is added to prefs.js?
A) user_pref(” javascript.console.open_on_error”, false);
B) user_pref(“javascript.console.open_error “, true);
C) user_pref(“javascript.console.open_error “, false);
D) user_pref(“javascript.console.open_on_error”, true); ✔️

32-To open a dialog box each time an error occurs, which of the following is added to prefs.js?
A) user_pref(“javascript.classic.error_alerts”, true); ✔️
B) user_pref(“javascript.classic.error_alerts “, false);
C) user_pref(“javascript.console.open_on_error “, true);
D) user_pref(“javascript.console.open_on_error “, false);

33-The syntax of a blur method in a button object is
A) Blur() ✔️
B) Blur(contrast)
C) Blur(value)
D) Blur(depth)

34-The syntax of capture events method for document object is
A) captureEvents()
B) captureEvents(args eventType)
C) captureEvents(eventType) ✔️
D) captureEvents(eventVal)

35-The syntax of close method for document object is
A) Close(doC)
B) Close(object)
C) Close(val)
D) Close()✔️

36-<script type=”text/javascript”>
x=4+”4″;
document.write(x);
</script>
Output——?
A) 44 ✔️
B) 8
C) 4
D) Error output

37-Is it possible to nest functions in JavaScript?
A) True ✔️
B) False

38-<script> document.write(navigator.appCodeName); </script>
A) get code name of the browser of a visitor ✔️
B) set code name of the browser of a visitor
C) None of the above
D) Both A and B

39-Scripting language are
A) High Level Programming language ✔️
B) Assembly Level programming language
C) Machine level programming language
D) None of the above

40-Which best explains getSelection()?
A) Returns the VALUE of a selected OPTION.
B) Returns document.URL of the window in focus.
C) Returns the value of cursor-selected text ✔️
D) Returns the VALUE of a checked radio input.

41-Choose the client-side JavaScript object:
A) Database
B) Cursor
C) Client
D) File UpLoad ✔️

42-What is mean by “this” keyword in JavaScript?
A) It refers current object ✔️
B) It referes previous object
C) It is variable which contains value
D) None of the above

43-In JavaScript, Window.prompt() method return true or false value ?
A) False ✔️
B) True

44-<script language=”javascript”>
function x()
{
document.write(2+5+”8″);
}
</script>
A) 258
B) Error
C) 7
D) 78 ✔️

45-<script type=”text/javascript”>
var s = “9123456 or 80000?”;
var pattern = /\d{4}/;
var output = s.match(pattern);
document.write(output);
</script>
A) 9123 ✔️
B) 91234
C) 80000
D) None of the above

46-JavaScript is interpreted by
A) Client ✔️
B) Server
C) Object
D) None of the above

47-Using _____ statement is how you test for a specific condition.
A) Select
B) If ✔️
C) Switch
D) For

48-Which of the following is the structure of an if statement?
A) if (conditional expression is true) thenexecute this codeend if
B) if (conditional expression is true)execute this codeend if
C) if (conditional expression is true) {then execute this code>->} ✔️
D) if (conditional expression is true) then {execute this code}

49-How to create a Date object in JavaScript?
A) dateObjectName = new Date([parameters]) ✔️
B) dateObjectName.new Date([parameters])
C) dateObjectName := new Date([parameters])
D) dateObjectName Date([parameters])

50-The_____method of an Array object adds and/or removes elements from an array.
A) Reverse
B) Shift
C) Slice
D) Splice ✔️

51-To set up the window to capture all Click events, we use which of the following statement?
A) window.captureEvents(Event.CLICK); ✔️
B) window.handleEvents (Event.CLICK);
C) window.routeEvents(Event.CLICK );
D) window.raiseEvents(Event.CLICK );

52-Which tag(s) can handle mouse events in Netscape?
A) <IMG>
B) <A> ✔️
C) <BR>
D) None of the above

53-____is the tainted property of a window object.
A) Pathname
B) Protocol
C) Default status ✔️
D) Host

54-To enable data tainting, the end user sets the environment variable.
A) ENABLE_TAINT
B) MS_ENABLE_TAINT
C) NS_ENABLE_TAINT ✔️
D) ENABLE_TAINT_NS

55-In JavaScript,____ is an object of the target language data type that encloses an object of the source language.
A) A wrapper ✔️
B) A link
C) A cursor
D) A form

56-When a JavaScript object is sent to Java, the runtime engine creates a Java wrapper of type
A) ScriptObject
B) JSObject ✔️
C) JavaObject
D) Jobject

57-_____class provides an interface for invoking JavaScript methods and examining JavaScript properties.
A) ScriptObject
B) JSObject ✔️
C) JavaObject
D) Jobject

58-____is a wrapped Java array, accessed from within JavaScript code.
A) JavaArray ✔️
B) JavaClass
C) JavaObject
D) JavaPackage

59-A____object is a reference to one of the classes in a Java package, such as netscape.javascript.
A) JavaArray
B) JavaClass ✔️
C) JavaObject
D) JavaPackage

60-The JavaScript exception is available to the Java code as an instance of
A) netscape.javascript.JSObject
B) netscape.javascript.JSException ✔️
C) netscape.plugin.JSException
D) None of the above

O LEVEL M2-R5 (WEB DESIGNING AND PUBLISHING) MCQs OF HTML

Related Link