Login
Remember
Register
Ask a Question
If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?
0
votes
asked
Oct 9, 2022
in
JavaScript
by
Robin
If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?
a) para1="New Text"
b) para1.value="New Text";
c) para1.firstChild.nodeValue= "New Text";
d) para1.nodeValue="New Text";
javascript
code
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Oct 9, 2022
by
Robin
Answer:- B
reason:- the correct syntax to change the text within the paragraph is "para1.value="New Text";"
...