`

ajax异步获取数据

 
阅读更多

<script src="../js/json2.js"></script>

 

function getCloundNotes() {

var strData = "";

var cloudNotesData = {};

var moduleArray = ["taskCenter", "calendar", "notice", "others"];

 

for (var i = 0; i < moduleArray.length; i++) {

 

var aj = $.ajax({

url : 'http://192.168.114.117:9080/GeneralSHPlatform/listNote.action',

data : {

"personid" : "LJ",

"pagesize" : 1,

"pageno" : 1,

"module" : moduleArray[i]

},

type : 'post',

cache : false,

dataType : 'json',

                        async: false,

success : function(data) {

strData = JSON.stringify(data.responseTxt);

alert("strData:" + strData);

},

error : function() {

alert("异常!");

}

});

 

}

 

// alert("ok:"+JSON.stringify(data.responseTxt) );

}

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics