我使用javascript格式编号为: 1,000,000,但我不能使用运算符+、-、* /和数字在“方框输入”中。
然后单击“尝试”:
以下错误:
苏田GOC:NaN 苏田GOC:NaN
这是我的密码:
result = split[1] != undefined ? result + decimal_separator + split[1] : result;
parseInt('result');
return prefix == undefined ? result : (result ? prefix + result : '');谢谢!
发布于 2018-01-05 07:46:06
我将全局变量",“改为”,然后将其转换为数字。“
var x = document.getElementById("ST").value.replace(/,/g,"");
var y = document.getElementById("TG").value.replace(/,/g,"");https://stackoverflow.com/questions/48101072
复制相似问题