【发布时间】:2013-07-31 20:14:17
【问题描述】:
提醒这些
var htmldata = theParent.html();
我得到了这个结果
<!--<div id="megamenu_part2">
<div class="first_rowtitle" id="megamenu_part2-in"><h6><a href="/news/159">one is</a></h6>
<div class="mochu_newstile">
<span><img src="images/megamenu-icon_01.png"></span><span class="viewnumber_countfirst2">250</span>
<span><img src="images/megamenu-icon_line.png"></span>
<span><img src="megamenu-icon_comment.png"></span><span>0</span>
</div>
</div>-->
之后使用 jQuery 我想获得 html() of class= 'viewnumber_countfirst2' 我怎样才能得到?
是var childht = $(htmldata).$('.viewnumber_count_sh').html() 这会起作用吗????
【问题讨论】:
-
没有班级
viewnumber_count_sh -
也许你应该从学习jQuery开始api.jquery.com
-
类是'viewnumber_countfirst2'