1
我打电话给showedit
函数带有参数。但是当我alert
它在它显示部分价值的功能。Javascript函数没有得到整个值
下面是HTML代码:
<a href="javascript:void(0)" onclick="showedit(856478546521458789);">
<i class="fa fa-pencil-square-o" aria-hidden="true" style="font-size: 20px;float: right;"></i>
</a>
下面是Javascript代码:
function showedit(id) {
alert(id);
document.getElementById("update_status_" + id).style.display = "block";
document.getElementById("status_" + id).style.display = "none";
}
你能告诉我是什么问题?
可能的重复[什么是JavaScript的最高整数值,数字可以去不失精度?](https://stackoverflow.com/questions/307179/what-is-javascripts-highest-integer-value-that -a-number-can-go-to-without-losin) –
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER – Teemu
也许你应该把它写成一个字符串,而不是一个数字。 – Stephan