<body>
<h3 class="text-left" onclick="AiLink()">
<span class="mui-btn mui-btn-success">绿色按钮</span>
</h3>
。。。
</body>
。。。
function AiLink() {
postdata = "test”
mui.ajax({
type: "post",
url: "http://localhost/resources/connector/?apikey=test",
data: postdata,
contentType: "application/xml",
success: function(result) {
result = JSON.stringify(result);
alert(result);
},
error: function(xhr, type, errorThrown) {
//异常处理;
console.log(JSON.stringify(xhr));
}
});
}
以上这段代码竟然闪退了,不管真机直接测试还是打包app测试,均闪退,希望大神指导!
0 个回复