jQuery(document).ready(function($)
{
$("#div1").mouseover(function() {
alert('ddddddd');
});
$("#btnGetValue").click(function() {
var vUrl = $("#hUrl").val();
$.ajax(
{
type: "POST",
url: vUrl,
data: null,
beforeSend: function(xhr) {
xhr.setRequestHeader("ajaxpro-method", "HelloWorld");
},
success: function(s) {
alert(s);
var a = document.getElementById("div");
a.innerHTML= s;
}
});
});
});
后台:
AjaxPro.Utility.RegisterTypeForAjax(typeof(Default3));
if (!IsPostBack)
{
string path = "/WebSite1/ajaxpro/Default3,";
path += typeof(Default3).Assembly.FullName.Split(',')[0];
path += ".ashx";
hUrl.Value = path;
}
[AjaxPro.AjaxMethod]
public string HelloWorld()
{
return "
aaaa
查看更多关于juery和ajaxPro结合使用的问题,如内容_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did108566