标签:code cti 处理 alert eth 传递 uri 方法 replace
encodeURI(url).replace(/\+/g, ‘%2B‘)
例子:
$scope.getAnesthesiawaystatistical = function (annual, anesthesiaMethodRep) {
var Anesthesiurl = "/api/v1/AnesthesiAwayStatistical/GetAnesthesiAwayStatisticalCount?anesthesiaMethodRep=" + "‘" + anesthesiaMethodRep + "‘" + "&annual=" + annual;
alert(encodeURI(Anesthesiurl).replace(/\+/g, ‘%2B‘));
$http.get(encodeURI(Anesthesiurl).replace(/\+/g, ‘%2B‘)).success(function (data) {
if (data.has_val) {
$scope.AnesthesiAwayStatisticalList = data.result;
console.log($scope.AnesthesiAwayStatisticalList);
}
});
}
标签:code cti 处理 alert eth 传递 uri 方法 replace
原文地址:http://www.cnblogs.com/zhangxiaolei521/p/6208491.html