Javascript不允许“@”签名

时间:2016-12-16 19:19:01

标签: javascript php jquery ajax

我在使用AJAX更改邮件地址时遇到问题。不知何故,当我输入电子邮件地址时,它看不到变化,但它应该。这是一个更改邮件地址的地方。你能检查一下吗?

PHP

<div class="col-xs-12 col-sm-12 col-md-12">
  <div class="icon-email-icon tooltip mrgn-bot">Email</div>
    <input type="text" value="<?php echo $update_['email'];?>" 
           class="profile-textbox pull-right" 
           onchange="saveToDatabase(this.value,'email','<?php echo $getID; ?>');">
  </div>

JS

function saveToDatabase(editableObj,column,id) {
    $(editableObj).css("background","#FFF url(../img/loaderIcon.gif) no-repeat right");
    var result = window.confirm("Are you sure?");
        if(result == true) {
            var str = 'column='+column+'&editval='+editableObj+'&id='+id;
            $.ajax({
                url: "saveedit.php",
                type: "POST",
                data: str,
                success: function(data){
                    $(editableObj).css("background","#FDFDFD");
                    alert("Your Information was successfully changed.");
                }        
            }); 
        }
        else
            return 0;
}

0 个答案:

没有答案