PrepAway - Latest Free Exam Questions & Answers

Which function should you use?

You are developing a web form that includes the following code.

When a user selects the check box, an input text box must be added to the page dynamically.
You need to ensure that the text box is added.
Which function should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:
We create a now div element with the textbox.
We then use appendChild() method appends this node as the last child the input node divname.
HTML DOM appendChild() Method


Leave a Reply