示例代码:
<div id='id1'> <a id='a1' /> <a id='a2' /> <a id='a3' /> </div>
我想得到id a1.
我试过$(‘#id1 a:first-child’).html()来获取文本.如何获取ID?
$("#id1:first-child").attr("id")