这个js该如何写
var value1 = $('div.m_con.m_jk div:visible div.m_progress.progress1 .num').text();
为什么这样出来的话会有1001000 2个值 ,如何才能只取到100这个值 ?
<div class="m_con m_jk">
<div id="tab1">
<div class="m_jk_c m_tab_c">
<div style="display: block">
<table>
<tr>
<td class="wd1"><span class="m_ico2_1"></span></td>
<td class="td1"></td>
<td colspan="4">
<div class="m_progress progress1">
<div class="m_progress_start">500</div>
<div class="m_progress_range">
<div class="m_progress_percent_bg">
<div class="m_progress_percent"></div>
</div>
<div class="m_progress_cursor"></div>
<div class="m_progress_cursor_title">
<span class="num">100</span>
<div class="corner"></div>
</div>
</div>
<div class="m_progress_end">3000</div>
</div>
</td>
</tr>
</table>
</div>
<div style="display: block">
<table>
<tr>
<td class="wd1"><span class="m_ico2_1"></span></td>
<td class="td1"></td>
<td colspan="4">
<div class="m_progress progress1">
<div class="m_progress_start">100</div>
<div class="m_progress_range">
<div class="m_progress_percent_bg">
<div class="m_progress_percent"></div>
</div>
<div class="m_progress_cursor"></div>
<div class="m_progress_cursor_title">
<span class="num">1000</span>
<div class="corner"></div>
</div>
</div>
<div class="m_progress_end">3000</div>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
[解决办法]
$('div.m_con.m_jk div:visible div.m_progress.progress1 .num').eq(0).text()