下列代码分析正确的是( )。 1 function createNode () { 2var pl=document. createElement ( p ) ; 3 var txt=document. createTextNode ( Hello ! ) ; 4 pl.appendChild (txt) ; 5 document.appendChild (p) ; 6 }
代码第2行是创建一个元素标记
代码第4行是为文档添加文本节点
是文本节点的子节点
函数的功能是创建新的文本节点
点击这里跳转到答案查看网获取答案