当我在元素生成时为元素设置is时,我收到了一个错误,说"this.nextSiblingElement.id是空的“。我承认还需要做些工作。我只是好奇nextSiblingElement的ID作为null返回的原因是什么。我确保在下拉菜单之前生成了前面的元素,并将菜单放在previousChild.appendChild之前。//helper function to add elements to the form
function createNewFormElement(i
如何使用nextSibling在该段中提取段落文本?我尝试过许多变体,例如nextSibling.nodeValue或nextSibling.textContent,但它们都不起作用。 var a = document.getElementById("p1");
var b = a.nextSibling.nodeValue