jquery ajax 实例

    $(function(){
         $.ajax( { 
            url:'{:U('shenhe')}',// 跳转到 action 
            data:{ 
                   
            }, 
            type:'post', 
            cache:false, 
            dataType:'json', 
            success:function(data) { 
                if(data.status ==1 ){ 
                    $('.check').css('display','inline');
                }else{ 
                    $('.check').css('display','none');
                } 
             }, 
             error : function() { 
                  alert("异常!"); 
             } 
        });
    });

 

posted @ 2016-07-29 22:21  屌丝IT男  阅读(211)  评论(0编辑  收藏  举报