JS 获取自定义标签

<abc-aaa xwe='sdf'>AAAAAAAAAAAAAAAAAAAAAA</abc-aaa>

alert($("abc-aaa").attr("xwe"));
alert($("abc-aaa").text());

 

 

<ons-list style="margin: -1px 0" location="info">BBBBBBBBBBBBBBBB</ons-list>

alert($("ons-list[location='info']").text());

posted @ 2014-12-29 11:24  七郎  Views(2344)  Comments(0Edit  收藏  举报