English 中文(简体)
Jquery 错误的 18 后18 字元值
原标题:Jquery miss post 18 char value

我试图用简单的 jq 操作编码一个简单的行政界面来验证文章 。 在我的数据库里, 邮政 ids 被存储为“ 204906887878781880896 ” ( 18个字符 ), 当我回过头来时, 这是正常的, 但是当我把它发送到警告箱或脚本时, 它就像“ 2049068787878148100 ”, 是什么原因?

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script>
<script>
function setOnay(id,durum)
{
alert(id);
page = "admin_ajax.php?id="+id+"&durum="+durum;
alert(page);
$.post(page, function(data){
alert("Data Loaded: " + data);
if (data.trim() == "1") {
     document.getElementById("durum"+id).innerHTML="<b>ONAYLANDI</b>";
} else if (data.trim() == "2") {
     document.getElementById("durum"+id).innerHTML="<b>SİLİNDİ</b>";
//} else if (data.trim() == "3") {
 //      document.getElementById("durum"+id).innerHTML="<b>Silindi</b>";
    } else {
    alert("Onay mekanizmasında hata oluştu. Lütfen tekrar deneyiniz!");
}   
 },text);

}
</script>

html部分;

<td width="" align="center"><span id="<?php echo  durum .$tweet_id; ?>">
<a href="#"      onclick="setOnay(<? echo $tweet_id; ?>,1)"><img src="admin/check.png"/>
</a>  <a href="#" onclick="setOnay(<? echo $tweet_id; ?>,2)"><img src="admin/delete.png"/></a></span></td>
问题回答

Javascript允许的最大整数为+/- 9007199254740992。

ECMA 第8.5

你可以把它当作绳子通过, 这样就能解决你的问题。





相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签