如何获取A?
<div class="warpper"> <span class="content"> A <span>123</span> </span> </div> <script type=‘text/javascript‘ src=‘./jquery-1.7.2.min.js‘></script> <script type=‘text/javascript‘> var a = $(".content")[0].firstChild.data; function al(){ alert(a); } window.onload=al; </script>
获取span里面的值(特殊情况下 ),布布扣,bubuko.com
时间: 2024-10-12 23:00:13