(function($, doc) {
$.init();
$.ready(function() {
//-----------------------------------------
// //级联示例
var cityPicker3 = new $.PopPicker({
layer: 3,
});
cityPicker3.setData();
var showCityPickerButton = doc.getElementById('showCityPicker3');
var cityResult3 = doc.getElementById('cityResult3');
var setAddress = doc.getElementById('set_add');
showCityPickerButton.addEventListener('tap', function(event) {
cityPicker3.show(function(items) {
setAddress.style.display = 'none';
cityResult3.innerText = (items[0] || {}).text + " " + (items[1] || {}).text + " " + (items[2] || {}).text;
//返回 false 可以阻止选择框的关闭
//return false;
});
}, false);
});
})(mui, document);
$.ajax(getInfoUrl, {
data: {
userId: userId,
token: token
},
dataType: 'json', //服务器返回json格式数据
type: 'get', //HTTP请求类型
timeout: 10000, //超时时间设置为10秒;
success: function(data) {
console.log(data)
},
error: function(xhr, type, errorThrown) {
//异常处理;
console.log(type);
}
});
我下的AJAX怎么能回到那个 .setData();数据里面呢
0 个回复