Home >Web Front-end >HTML Tutorial >Problems with using juery and ajaxPro together, such as content_html/css_WEB-ITnose
前台:
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