I have seen that some browsers localize the input type="number"
notation of numbers.
So now, in fields where my application displays longitude and latitude coordinates, I get stuff like "51,983" where it should be "51.982559". My workaround is to use input type="text"
instead, but I'd like to use the number input with correct display of decimals.
Is there a way to force browsers to use a decimal point in the number input, regardless of client-side local settings?
(It goes without saying that in my application I anyway correct this on the server side, but in my setup I also need it to be correct on the client side (because of some JavaScript)).
Thanks in advance.
UPDATE
As of right now, checking in Chrome Version 28.0.1500.71 m on Windows 7, the number input just does not accept decimals formatted with a comma. Proposed suggestions with the step
attribute do not seem to work.
http://jsfiddle.net/AsJsj/
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…