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
< ;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
// Must quote
//Must quote