如何使用ASP.NET MVC在加速移动页面中使用ajax调用 [英] How to use ajax call in accelerated mobile page using ASP.NET MVC

查看:119
本文介绍了如何使用ASP.NET MVC在加速移动页面中使用ajax调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我很困惑如何使用Asp.net MVC在加速移动页面中使用Ajax调用?







函数调用(){

$ .ajax({

类型:GET,

crossDomain:true,

url:query,

contentType:application / json; charset = utf-8,

dataType :XML,

成功:函数(data1){

if(data1!= null){

Bind(data1); < br $>
}

},

错误:函数(响应,textStatus,errorThrown){

alert(errorThrown);

}

});

}



< a onclick =打电话给()>



我尝试了什么:



i尝试过很多R& D但无法获得任何结果

Hello
I am confusing that How to Use Ajax call in Accelerated Mobile Page Using Asp.net MVC?



function call(){
$.ajax({
type: "GET",
crossDomain: true,
url: query,
contentType: "application/json; charset=utf-8",
dataType: "XML",
success: function (data1) {
if (data1 != null) {
Bind(data1);
}
},
error: function (response, textStatus, errorThrown) {
alert(errorThrown);
}
});
}

<a onclick=call()>

What I have tried:

i tried a lot on R&D but can't get any result

推荐答案

.ajax({

类型:GET,

crossDomain:true,

url:query,

contentType:application / json; charset = utf-8,

dataType:XML,

成功:函数(data1){

if(data1!= null ){

Bind(data1);

}

},

错误:function(response,textStatus, errorThrown){

alert(errorThrown);

}

});

}



< a onclick = call()>



我尝试了什么:



i在R& D上试了很多但是没有得到任何结果
.ajax({
type: "GET",
crossDomain: true,
url: query,
contentType: "application/json; charset=utf-8",
dataType: "XML",
success: function (data1) {
if (data1 != null) {
Bind(data1);
}
},
error: function (response, textStatus, errorThrown) {
alert(errorThrown);
}
});
}

<a onclick=call()>

What I have tried:

i tried a lot on R&D but can't get any result


这篇关于如何使用ASP.NET MVC在加速移动页面中使用ajax调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆