ajax 请求服务器,页面打印平台报错 net::ERR_CONNECTION_REFUSED
$.ajax({
url: ‘接口名称’,
timeout: 5000
}).done(function (data) {
// 请求成功
}).fail(function (jqXHR, textStatus, errorThrown) {
//接口请求失败返回,net::ERR_CONNECTION_REFUSED 报错也会进入
console.info("请求失败");
});