前台:
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
;
}
上边有个div1鼠标滑过事件 这样从后台过来的滑过事件就不执行 为什么怎么才能执行 在线等
回复讨论(解决方案) 这问题到现在没有回答的 但是我用其他方法实现了 如果有能实现的人加分
这问题到现在没有回答的 但是我用其他方法实现了 如果有能实现的人加分
不是很明白楼主 在使用了 $.ajax的前提下还要使用 ajaxpro 是为什么
直接调用 default3.helloworld().value 不能满足你的要求?
若要非得使用此方式 访问
$.ajax(
{
type: post,
url: vurl,
beforesend: function (xhr) {
xhr.setrequestheader(content-type, text/plain;charset=utf-8);
xhr.setrequestheader(x- + ajaxpro.id + -method, helloworld);
if (!ms.browser.isie) {
xhr.setrequestheader(connection, close); // mozilla bug #246651
}
},
success: function (s) {
alert(eval(s + * + /));
}
});
});
以上 支持 非ie 系列 ,ie系列请求楼主有兴趣的话就看 ajaxpro 中core.ashx等文件
中ajaxpro是如何构造 的 xmlhttp请求
这问题到现在没有回答的 但是我用其他方法实现了 如果有能实现的人加分
不是很明白楼主 在使用了 $.ajax的前提下还要使用 ajaxpro 是为什么
直接调用 default3.helloworld().value 不能满足你的要求?
若要非得使用此方式 访问
$.ajax(
{
type: post,
url: vurl,
beforesend: function (xhr) {
xhr.setrequestheader(content-type, text/plain;charset=utf-8);
xhr.setrequestheader(x- + ajaxpro.id + -method, helloworld);
if (!ms.browser.isie) {
xhr.setrequestheader(connection, close); // mozilla bug #246651
}
},
success: function (s) {
alert(eval(s + * + /));
}
});
});
以上 支持 非ie 系列 ,ie系列请求楼主有兴趣的话就看 ajaxpro 中core.ashx等文件
中ajaxpro是如何构造 的 xmlhttp请求
我想说的是 事隔两年 我再回来看我之前的问题感觉很低级 我真的笑了