<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Document</title></head><body><div class="n1">12345<div>abc</div></div><p>12345<div>abc</div></p><script src="js/jquery-1.11.3.min.js"></script><script>var cont1 = $(".n1").html();var cont2 = $("p").html();console.log(cont1);console.log(cont2);</script></body></html>
添加回答
举报
0/150
提交
取消