js高級程序設計第332頁我用的谷歌瀏覽器<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Document</title></head><body><p id="p1"><b>hello</b>word</p><script>var range1 = document.createRange(),? ? p1 = document.getElementById("p1");var s=range1.selectNode(p1);console.log(s)//返回undefined</script></body></html>
請問下關于Dom中的范圍問題,為什么selectNode()返回undefined
我要去幼兒園深造了
2017-12-20 22:03:01