JAVA MCQS PART 06
1. <script type="text/javascript">x=4+"4";
document.write(x);
</script>
Output------?
A. 44
B. 8
C. 4
D. Error output
Ans: A
2. Is it possible to nest functions in JavaScript?
A. True
B. False
Ans: A
3. <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
Ans: A
4. Scripting language are
A. High Level Programming language
B. Assembly Level programming language
C. Machine level programming language
Ans: A
5. 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.
Ans: C
6. Choose the client-side JavaScript object:
A. Database
B. Cursor
C. Client
D. FileUpLoad
Ans: D
7. 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
Ans: A
8. In JavaScript, Window.prompt() method return true or false value ?
A. False
B. True
Ans: A
9. <script language="javascript">
function x()
{
document.write(2+5+"8");
}
</script>
A. 258
B. Error
C. 7
D. 78
Ans: D
10. <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
Ans: A
No comments:
Post a Comment