Machine-translated by Google. Questions are authored in English.
Top

JavaScript Fundamentals Questions and Answers

1.

Match the column JavaScript-Events with the column Descriptions.

JavaScript-EventsDescriptions
a) onchangei) The browser has finished loading the page.
b) onmouseoverii) An HTML element has been changed.
c) onkeydowniii) The user moves the mouse over an HTML element.
d) onloadiv) The user pushes a keyboard key.

Exam Year(s)

DSSSB TGT - 2023,

Answer: A

The correct match is a-ii, b-iii, c-iv, d-i. The onchange event fires when an HTML element has been changed, onmouseover when the user moves the mouse over an HTML element, onkeydown when the user pushes a keyboard key, and onload when the browser has finished loading the page. Every other option exchanges at least one of these pairs, for example giving onload to a keyboard action. A simple way to remember is that the name of each event states what happens: change, mouse over, key down and load.

Please log in or register to report this question.

2.

What is/are the purpose(s) of JavaScript events? i) Provide a dynamic interface to a webpage. ii) Provide a static interface to a webpage.

Exam Year(s)

DSSSB TGT - 2023,

Answer: A

Only statement i gives the purpose of JavaScript events: they provide a dynamic interface to a webpage, since the page can respond to what the user does, such as a click or a key press. A static interface would not need events, so statement ii is wrong. So 'Only (i)' is correct. Examples of events are onclick, onload and onkeydown, which trigger code when the user clicks, when a page has loaded or when a key is pressed.

Please log in or register to report this question.

Loading…
Tags: JavaScript Fundamentals Questions and Answers || JavaScript Fundamentals MCQ Questions and Answers || JavaScript Fundamentals GK Questions and Answers || JavaScript Fundamentals GK MCQ Questions || JavaScript Fundamentals Multiple Choice Questions and Answers || JavaScript Fundamentals GK || GK on JavaScript Fundamentals || Web Technologies Questions and Answers || Web Technologies MCQ Questions and Answers || Web Technologies GK Questions and Answers || GK on Web Technologies