371). The URL property belongs to which of the following object?

[A]Document
[B]Element
[C]Location
[D]Event

Show Answer

372). What does the location property represent?

[A]Current DOM object
[B]Current URL
[C]Both DOM object and URL
[D]Document

Show Answer

373). Which among the following is not a property of the Location object?

[A]protocol
[B]host
[C]hostee
[D]hostname

Show Answer

374). What is the return type of the hash property?

[A] Query string
[B]Packets
[C]String
[D]Fragment identifier

Show Answer

375). What is the function used to extract arguments from the search property of a URL?

[A]urlArgs()
[B]url()
[C]hash()
[D]geturl()

Show Answer

376). The decodeURIComponent() is defined by _____________

[A]Server-side JavaScript
[B]Client-side JavaScript
[C]Both Server-side and Client-side JavaScript
[D]Service side JavaScript

Show Answer

377). Which is the method that removes the current document from the browsing history before loading the new document?

[A]modify()
[B]assign()
[C]replace()
[D]remove()

Show Answer

378). Why is the replace() method better than the assign() method?

[A]Reliable
[B]Highly manageable
[C]More efficient
[D]Handles unconditional loading

Show Answer

379). What is the purpose of the assign() method?

[A] Only loading
[B]Loading of window and display
[C]Displays already present window
[D]Unloading of window

Show Answer

380). .The history property belongs to which object?

[A]Element
[B]Window
[C]History
[D]Location

Show Answer

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

1

2

3

function myFunction() { var x = document.getElementsByTagName("P").item(0); alert(x.innerHTML); }

[A]1
[B]2
[C]3
[D]Error

Show Answer

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

1

2

3

function myFunction() { var l = document.getElementsByTagName("P").length; alert(l); }

[A]1
[B]2
[C]3
[D]Error

Show Answer

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

Head

function myFunction() { var x = document.getElementsByTagName("P").namedItem("Element"); alert(x.innerHTML); }

[A]Head
[B]Element
[C]Error
[D]Undefined

Show Answer

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

head

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

Show Answer

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

  My title

[A]demo
[B]myHead
[C]error
[D]undefined

Show Answer