[英]How to replace the decimal comma to a point in <input type=“number”>?
这不起作用:
<input id="input" type="number" value = "10.5">
var input = document.getElementById("input");
input.value = input.value.replace(/,/, ".");
该答案将显示小数而不是逗号。
https://jsfiddle.net/ky6h0tpf/10/
<input id="input" type="number" value = "10.5">
您的浏览器语言环境可能有问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.