当我在浏览器上运行此程序时,我收到失败的响应,但在 android 手机中运行此程序时,我收到参考错误找不到变量数据。代码也可以在模拟器中完美运行。帮我
<html>
<head>
<script type="text/javascript" charset="utf-8" src="phonegap-1.0.0.js"></script>
<script type="text/javascript" charset="utf-8" src="cordova-2.4.0.js"></script>
<script type = "text/javascript">
function getResponse(){
var url = "http://www.apexweb.co.in/apex_quote/phone_gap/uname_validation.asp?un=9999999999&pwd=123456789&callback=your_callback";
var head= document.getElementsByTagName('head')[0];
var script= document.createElement('script');
script.type= 'text/javascript';
script.src= url;
head.appendChild(script);
your_callback(data); //here i am getting reference error, can't find variable data
}
function your_callback(data){
var st = data.status;
alert(st);
}
</script>
</head>
<body>
<button input type = "button" onClick = "getResponse()"> GetResponse </button>
</body>
</html>