ajax 在其他浏览器可以 但是在IE下不行

浏览:780 发布日期:2015/11/13 分类:求助交流
客户端:<script>
    function f(tt){
     
        $.ajax({
            type : "POST",
            url : "{:U('index/show')}",
            data : {"username" :tt},
            cache : false,
            dataType : "json",
            beforeSend : function() {
            },
            success : function(msg) {
            alert(msg['info']);
                $("#content-fontsize").html(msg['info']);
                           },
             error:function(){
                alert(请求错误后);
            }
        });

    }

</script>
服务器端:public function show(){

  
header("Content-type: text/html; charset=utf-8");

 $id=$_POST['username'];
        if($id){
            if(!is_numeric($id)){
                exit();
            };}
        $datae=M('xinwen');
           $news=$datae->where('id='.$id)->select();
        //Response.ContentType = "application/json;charset=UTF-8";
     
       $data['staus']=1;
 
 
       $data['info']=$news[0]['content'];
      $this->ajaxReturn($data);
//echo('ddddddddddddd');
      
    }

 
在其他浏览器可以 但是在IE下 进error
最佳答案
评论( 相关
后面还有条评论,点击查看>>