Single Choice Easy

QWhat function does the assign() method serve?

ID: #5095 Javascript DOM & Event Handling MCQ 175 views
Question Info
#5095Q ID
EasyDifficulty
Javascript DOM & Event Handling MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Only loading
  • B Loading of window and display
  • C Displays already present window
  • D Unloading of window
Correct Answer

Explanation

The window loads and displays the page at the URL you give thanks to the assign() method of the Location object.
This method differs from replace() in that replace() deletes the URL of the current document from the document history, making it impossible to get back to the original document using the "back" button.

Share This Question

Challenge a friend or share with your study group.