我想重定向我的getJSON响应低于另一个HTML页面是两个HTMLS的getJSON响应重定向到另一个HTML页面
的index.html
$(document).ready(function() {
alert("load");
$.getJSON("http://10.0.2.2:8080v1/service/26/1",
function(data) { //want to redirect this response display.html
$.each(data, function(id, obj){
$.each(obj, function(propName, value){
// console.log(propName + ": " + value);
alert("propName: "+propName+" value: "+value);
});
});
});
document.addEventListener("deviceready", onDeviceReady, true);
});
function onDeviceReady(){
navigator.notification.alert("PhoneGap is working");
}
</script>
</head>
<body>
</body>
</html>
display.html
在代码这我有代码以表格的形式显示响应数据。你能帮我现在如何发送的getJSON响应display.html并在此
<body>
<table width="100%" cellspacing="3">
<tr align="center">
<td bgcolor="#474646" style="color: #fff; >first column</td>
<td bgcolor="#474646" style="color: #fff; >second column</td>
<td bgcolor="#474646" style="color: #fff; >third column</td>
</tr>
<tr align="center">
<td>firstcolumn</td>
<td>secondcolumn</td>
<td>thirdcolumn</td>
</tr>
</table>
</body>
你为什么不在display.html中做'getJson'? – 2012-03-16 15:07:12
你能说我哦如何显示在表中的响应,如果我写在display.html的getjson – user1265530 2012-03-16 18:43:02