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