jQuery 截取double数据 重新赋值

$('.prioritySort').each(function(i){
$(this).text($(this).text().substring(0,$(this).text().indexOf('.')));
});

<td class="prioritySort">${mapData.priority}</td><!-- 排序 -->

===========================================

原显示的是2.0,截取的效果如下!

原文地址:https://www.cnblogs.com/austinspark-jessylu/p/6097270.html