Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?
Home
JavaScript
If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within...
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";"
Related questions
0
votes
Q: Syntax for creating a RegExp object: 1. var txt=new RegExp(pattern,attributes); 2. var txt=/pattern/attributes; Which of the above mentioned syntax will correct?
asked
Oct 9, 2022
in
JavaScript
by
Robin
javascript
code
0
votes
Q: Which one of the following options is the correct output for the given code of JavaScript?
asked
Mar 23, 2021
in
JavaScript
by
sharadyadav1986
javascript
output
code
program
0
votes
Q: Which one of the following options is the correct output for the given code of JavaScript?
asked
Mar 23, 2021
in
JavaScript
by
sharadyadav1986
javascript
output
code
0
votes
Q: Which one of the following options is the correct output for the given code of JavaScript?
asked
Mar 23, 2021
in
JavaScript
by
sharadyadav1986
javascript
output
code
+1
vote
Q: Which one of the following options is the correct output for the given code of java script?
asked
Mar 22, 2021
in
JavaScript
by
Robindeniel
javascript
car
code
output
+1
vote
Q: To know about an object, whether the object is a prototype (or a part of a prototype chain) of another object, the user can use_______
asked
Mar 22, 2021
in
JavaScript
by
Robindeniel
javascript
operator
code
0
votes
Q: What if we put ++ operator inside if condition? find the output of below code <script> var a = 10; if(a == a++) document.write(a); </script>
asked
Oct 9, 2022
in
JavaScript
by
Robin
javascript
code
0
votes
Q: Which one of the following keywords is used for defining the function in the JavaScript?
asked
Mar 23, 2021
in
JavaScript
by
sharadyadav1986
javascript
funciton
code
0
votes
Q: Choose the correct JavaScript syntax to change the content of the following HTML code.
asked
Oct 10, 2022
in
JavaScript
by
SakshiSharma
javascript
0
votes
Q: Which one of the following code is equivalent to the following given code?
asked
Mar 23, 2021
in
JavaScript
by
sharadyadav1986
javascript
code
program
...