📜  如果 para1 是段落的 DOM 对象,那么更改段落中文本的正确语法是什么? - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:45.258000             🧑  作者: Mango

代码示例1
If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph? 

A.  \"New Text\"? 
B.  para1.value=\"New Text\"; 
C.  para1.firstChild.nodeValue= \"New Text\";
D.  para1.nodeValue=\"New Text\";