jQuery, change separator to dot and divide two selected numbers
问题 var result = parseFloat($('.lot2').text()) / parseFloat($('span.Price').text()); $('.result').text(result); }); How can I convert selected values from comma separated values to dot separated values? There is this function str.replace, but I don't know how to put it in the function. 回答1: How can I convert selected values from comma separated values to dot separated values? From that, I take it that the values you get from $('.lot2').text() and $('span.Price').text() will use , as the decimal