<html>
<head></head>
<body>
<div class="mtb-desc">
some contentsome contentsome contentsome contentsome contentsome contentsome contentsome content.
some contentsome contentsome contentsome entsome contentsome contentsome contentsome contentsome.
NO : 212122Name is Jone</div>
<span class="mtb-price">
<label Class="mtb-ofr"><b class="lb1"></b>WWWW</label></span>
<script>
var eg1 = document.querySelectorAll('.mtb-desc')[0].childNodes[0].split(null)[1].nodeValue;
var eg2 = document.querySelectorAll('.mtb-ofr')[0].childNodes[1].nodeValue = eg1;
alert(eg2);
</script>
</body>
</html>
在上面的代码中,我想用文本 Name is Jone 替换 WWWW。那么我如何从该文本节点访问“Name is Jone”文本?