311). Which of the following is a way of embedding Client-side JavaScript code within HTML documents?

[A]From javascript:encoding
[B] External file specified by the src attribute of a “script” tag
[C]By using a header tag
[D]By using body tag

Show Answer

312). When does JavaScript code appear inline within an HTML file?

[A]Between the “script” tag
[B]Outside the “script” tag
[C] Between or Outside the “script” tag
[D]Between the header tag

Show Answer

313). Which character in JavaScript code will be interpreted as XML markup?

[A]!
[B]>
[C]&
[D].

Show Answer

314). Which is the root element in a HTML document?

[A]HTML
[B]HEAD
[C]SCRIPT
[D]BODY

Show Answer

315). What is the code for getting the current time?

[A]now = new Date();
[B]var now = new Date();
[C]var now = Date();
[D] var now = new Date(current);

Show Answer

316). What is the code to start displaying the time when the document loads?

[A]onload = displayTime;
[B]window. = displayTime;
[C] window.onload = displayTime;
[D]window.onload = start;

Show Answer

317). One of the main advantage of using src attribute is ____________

[A] It becomes self-cached
[B]It makes the HTML file modular
[C]It restricts manipulation in the HTML file
[D] It simplifies the HTML files

Show Answer

318). 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

Show Answer

319). What is the default value of the type attribute?

[A]text/css
[B]text/javascript
[C]html
[D]xml

Show Answer

320). 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

Show Answer

321). What will be the output of the following JavaScript code?

[A]8 9
[B] 8 18
[C]4 9
[D]Error

Show Answer

322). What will be the output of the following JavaScript code?

[A]100
[B]99
[C]0
[D]error

Show Answer

323). What will be the output of the following JavaScript code?

[A]true
[B]false
[C]0
[D]error

Show Answer

324). What will be the output of the following JavaScript code?

[A]True
[B]False
[C]Error
[D]Undefined

Show Answer

325). What will be the output of the following JavaScript code?

[A]2
[B]3
[C]4
[D]0

Show Answer