这是一个HTML片段,我想要的只是获取文本节点并迭代它们.请告诉我.谢谢.
<div>
<div>
Select your Age:
<select>
<option>0 to 10</option>
<option>20 and above</option>
</select>
</div>
<div>
Help/Hints:
<ul>
<li>This is required field.
<li>Make sure select the right age.
</ul>
<a href="#">Learn More</a>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
结果: