function check_input_money(obj)
{
rtn_val = $(obj).val().replace( /[^\d|\.]/g, ‘‘);
var price = /^\d+(\.\d{0,2})?/.exec(rtn_val);
if(price != null){
unit_price = price[0];
$(obj).val(unit_price);
}else{
$(obj).val(‘‘);
}
}
时间: 2024-10-16 02:12:14