服务器是linux系统。 这个按钮好像在windows系统是正常的,具体的不确定,也可能是代码问题,求大神指点。
<script type="text/javascript">
$(".r_but").click(function(){
var idtype=$(this).attr("idtype");
$.ajax({
url:'{:U("Index/Wallet/withpost")}',
type:'POST',
data:$("#"+idtype).serialize(),
dataType:'json',
success:function(json){
layer.msg(json.info);
if(json.result ==1){
window.location.href=json.url;
}
},
error:function(){
layer.msg("网络故障");
}
})
})
</script>

