State whether the following sentences are true or false. (i) In JavaScript…
2019
State whether the following sentences are true or false. (i) In JavaScript forms, automatic form validation is enabled using the “required” attribute. (ii) JavaScript cannot manipulate HTML styles.
- A.
(i) – True, (ii) – False
- B.
(i) – False, (ii) – True
- C.
(i) – False, (ii) – False
- D.
(i) – True, (ii) – True
Attempted by 140 students.
Show answer & explanation
Correct answer: A
Correct answer: (i) is True, (ii) is False. Explanation: Statement (i): The required attribute enables browser-based automatic form validation. When a form control has required, the browser will prevent submission until a value is provided (for example: <input required>).
A video solution is available for this question — log in and enroll to watch it.