Home > Web Front-end > JS Tutorial > body text

Share the solution to the unresponsive ajax submission in jquery.form in IE_jquery

WBOY
Release: 2016-05-16 17:50:08
Original
1107 people have browsed it

After spending three hours checking repeatedly, I found that it turned out that the return header information of the processing page had been changed.
After adding application/x-javascript, ie8 will not work.
If it’s text/html, that’s fine, or you don’t have to specify it.
Is this a bug? Let me say hello to the IE developer who wrote this code.
It seems that you need to pay attention to the header information and encoding of ajax.
Introduction to the way of ajax submitting form data

Number of Url parameter submissions

Copy code The code is as follows:


< ;script type="text/javascript">
function checkCorpID()//Check whether the customer number is available
{
if($.trim($("#txtF_CORPID")[0].value )=="")//txtF_CORPID is the customer number input box
{
alert("Please enter the customer number!");
}
else
{
$(" #checkFlag").html("Checking");//Display prompt information
$.ajax({
type: "get",
url: "CheckCorpID.ashx",
data : "ID=" $.trim($("#txtF_CORPID")[0].value),//Submit the form, equivalent to CheckCorpID.ashx?ID=XXX
success: function(msg){$(" #checkFlag").html("");alert( msg ); } //Operation after successful operation! msg is the value passed from the background
});
}
}
< ;/script>

2: Form submission data front-end code:
Code
Copy code The code is as follows:

// Must quote
//Must quote

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template