如何用jQuery替换输入值中的符号?

如何用jQuery替换输入值中的符号?,jquery,Jquery,我已生成具有价格值的输入 例如: <input type="text" value="59,00"/> 你能帮我一下吗你应该使用正则表达式, $('input:text').each(function() { var value = $(this).val(); $(this).val(value.replace(/\,/i, '.')); }); $('input:text').each(function() { var value = $(this).

我已生成具有价格值的输入

例如:

<input type="text" value="59,00"/>

你能帮我一下吗你应该使用正则表达式,
$('input:text').each(function() {
    var value = $(this).val();
    $(this).val(value.replace(/\,/i, '.'));
});
$('input:text').each(function() {
    var value = $(this).val();
    $(this).val(value.replace(/\,/i, '.'));
});