ajax知识点

$.ajax({
                'url': url,
                'data':{'json': JSON.stringify(parm)},
                'dataType': 'json',
                'type' : 'post',
                'success':function(data){
                    if (data.session !== undefined) {
                        $('input[name=sid]').val(data.session.sid);
                        $('input[name=uid]').val(data.session.uid);
                    } 
                    $("#request").html(JsonUti.convertToString(data));
                },
                'beforeSend' : function(){
                    $("#request").html('加载数据中...');
                },
                'error' : function(i, data){
                    $("#request").html(i.responseText);
                }
            });

 

posted @ 2016-04-23 18:15  侠岚之弋痕夕  阅读(366)  评论(0编辑  收藏  举报
Where is the starting point, we don't have a choice, but the destination where we can pursue!