Ajax编程相对路径与绝对路径

http://www.worlduc.com/blog2012.aspx?bid=16946309

ajax同一域名调用采用相对路径

var url = 'QuerySingleDataByField?funId=44&_criteria=[{' + '"fieldName":' + '"perform_id"' + ',"operator":' + '"="' + ',"value":' + performId + '}]&_fields=data_id';

$.ajax({    

url: url,    

type: 'get',    

dataType: 'json',   

contentType: 'application/json',    

data: {},    

success: function(objResult) {

if (objResult.data != null) {            

var dataid = objResult.data["data_id"];            

window.location = 'customFunDataOp?funId=44&dataId=' + dataid + '&performId=' + performId;

 } else {            

alert('该场次没有销售设置信息');

 

        }

    }

 

});

 

posted @ 2015-07-08 11:38  多远才是未来  阅读(4075)  评论(0编辑  收藏  举报