<!DOCTYPE html><html><head>?? ?<meta charset="UTF-8">?? ?<title>Document</title></head><body>?? ?<h1 id="h1">?? ?明天休息?? ?</h1>?? ??? ?</body>?? ?<script>?? ? ?? ? var C = document.getElementById("h1").childNodes;?? ? ?? ? alert(C.nodeValue);?? ?</script></html>
childnodes的問(wèn)題,為什么輸出結(jié)果為undefined
慕粉3541299
2016-10-10 16:05:26