日期:2014-05-16 浏览次数:20445 次
<html> <head> <script type="text/javascript" id="script1"></script> <script type="text/javascript"> function a() { document.all.script1.src='response.js'; } function jsonp_callback(data) { alert(data.RESULT[0].errmsg); document.all.text1.value = data.RESULT[0].errmsg; } //例子 function searchCustInfo(){ jQuery.ajax({ url : "http://192.168.101.190:8080/custview/custView/test.jsp", data : {param1:"123456", param2:"wedrftgyhl"}, // 传递参数 dataType: "jsonp", success: function(data) { alert(data.RESULT[0].retno); document.getElementById("conditionValue").value = data.RESULT[0].retno; }, error: function() { alert("网络繁忙,请重试!"); } }); } </script> </head> <body> <input type="button" value="click" onclick="a();"> <input type="text" value="text" name="text1"> </body> </html>
jsonp_callback({"RESULT":[{"retno":"-1","errmsg":"该号码不能在此缴费 .错误码:[-1808]","errno":"-1808"}]});