<span class="test1"> +123.23 </span> <span class="test2"> -13.23 </span>
我想从jQuery中删除“”和“ – ”.
输出:
<span class="test1"> 123.23 </span> <span class="test2"> 13.23 </span>
var val = $("span").html(); $("span").html(val.substring(1,val.length));