You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
590 B
19 lines
590 B
|
4 months ago
|
|
||
|
|
|
||
|
|
//调用WebService
|
||
|
|
$.postJSON = function(url, data, success, error) {
|
||
|
|
$.ajax({
|
||
|
|
type: "POST", //访问WebService使用Post方式请求
|
||
|
|
contentType: "application/json;charset=utf-8", //WebService 会返回Json类型
|
||
|
|
url: url,//"http://192.168.11.126:8099/PPVisionServer.asmx/GetBranchByID", //调用WebService
|
||
|
|
data: JSON.stringify(data),//"{type:3,id:123,step:1}",
|
||
|
|
dataType: 'json',
|
||
|
|
//beforeSend: function(x) { x.setRequestHeader("Content-Type", "application/json; charset=utf-8"); },
|
||
|
|
error: error,
|
||
|
|
success: success //function(response){var json = response.d;}
|
||
|
|
});
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
|