Question 50Asked in DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)

Which of the following DHTML methods is used to control the browser window size, such as

Which of the following DHTML methods is used to control the browser window size, such as resizing it dynamically via JavaScript?
  1. Awindow.resizeTo()
  2. Bwindow.setSize()
  3. Cwindow.changeSize()
  4. Ddocument.resizeWindow()
Show answerHide answer

Correct answer: (A) window.resizeTo()

Explanation

window.resizeTo(width, height) resizes the browser window to the given size (resizeBy changes it by an amount). setSize(), changeSize() and resizeWindow() do not exist.

From DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 1 (9:00 AM)

This is question 50 of DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 1 (9:00 AM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.