我這個問題達成自2天后,我需要使用javascript從以下網址獲取數據。如何獲得在PhoneGap的使用javascript從URL響應,Jquery的
http://www.apexweb.co.in/Apex_Quote/Download_Data.asp?un=9393910169
我分析了靜態數據,但我需要從URL解析數據。幫我
var employees = [{"ContactName":"AksharmaDelhi","ContactNumber":"9313146690","MainCategory":"NONLOCAL","SubCategory":"LIG"},
{"ContactName":"AbhijeetPune","ContactNumber":"9271263359","MainCategory":"NONLOCAL","SubCategory":"LIG"},
{"ContactName":"Abhinandan","ContactNumber":"9954534007","MainCategory":"NONLOCAL","SubCategory":"LIG"},
{"ContactName":"Abhishek","ContactNumber":"9302172932","MainCategory":"NONLOCAL","SubCategory":"LIG"},
{"ContactName":"AbhishekPuri","ContactNumber":"9303928233","MainCategory":"NONLOCAL","SubCategory":"LIG"},
{"ContactName":"AbhishekZhakkas","ContactNumber":"9863027167","MainCategory":"NONLOCAL","SubCategory":"MIG"},
{"ContactName":"Abin","ContactNumber":"8891886340","MainCategory":"NONLOCAL","SubCategory":"MIG"},
{"ContactName":"AccountantSrinivas","ContactNumber":"9949861074","MainCategory":"LOCAL","SubCategory":"MIG"},];
alert(employees.length); //get length
for(var i = 0;i<employees.length;i++){
alert(employees[i].ContactName + employees[i].ContactNumber + employees[i].MainCategory + employees[i].SubCategory);
}
</script>
你想解析這個數據在Android?或JavaScript?使用JavaScript –
,我在android系統做了前面 – user1365420
你試過['$ .getJSON?'](http://api.jquery.com/jQuery.getJSON/) – Omar