前台:
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;
}
});
});
});
This question has not yet been answered. There is no answer, but I used other methods to achieve it. If anyone can achieve it, extra points
I don’t quite understand why the poster uses ajaxpro on the premise of using $.ajax.
Directly calling Default3.HelloWorld().value cannot meet your requirements?
If you have to use this method to access
$.ajax(
type: "POST",
url: vUrl,
beforeSend: function ( xhr) {
xhr.setRequestHeader("X-" AjaxPro.ID "-Method", "HelloWorld ");
hr.setRequestHeader("Connection", "close"); // Mozilla Bug #246651
},
success: function (s) {
);
);
The above supports non-ie series. If you are interested in the ie series request, please see the core.ashx and other files in ajaxpro
How is the xmlhttp request constructed in ajaxpro
This question has not been answered yet, but I implemented it using other methods. If anyone can achieve it, extra points