<script type="text/javascript">
function send(){
var usersid = "<?php echo $usersid;?>";
var fullname = document.myform.fullname.value;
var data={
usersid:usersid,
fullname:fullname,
};
data = JSON.stringify(data);
data = data.replace(/{|}|"/ig,"")
data = data.replace(/:/ig,"=")
data = data.replace(/,/ig,"&")
//console.log(data)
ajax('post',"myinfo_save.php",data,function(res){
str = eval('('+res+')');
//alert(res)
if(str['state']==1){
alert('OK');
location.replace('myinfo.php?usersid=5');
//window.history.go(-1);
}
if(str['state']==2){
alert('提交信息有误,请重新提交!');
}
});
}
</script>