为什么 100 >= 99.2 是错误的呢?这是怎么回事?
var ls = parseFloat(("100").replace(",", ".")).toFixed(1);
var val = parseFloat(("99,2").replace(",", ".")).toFixed(1);
alert(ls >= val); /*=> result is false ...but it should be true */
UI文化是nl-BE
JSFiddle: http://jsfiddle.net/Ed6VY/
alert(typeof ls);
来验证它是一个字符串。 - h2ooooooo