how to read a textbox value excluding commas using jquery
My requirement is to read a textbox value with a currency formatted number. eg: 3,500
How to read the textbox value excluding comma in the number? C开发者_运维技巧an anyone please help me in doing this using jquery?
$('input').val().replace(',', '');
Get the value, split it (by comma), then join it back together
$('#box').val().split(',').join();
var value = Number($("input:text").val().replace(/[^0-9\.]+/g,""));
精彩评论