我在使用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;
}