ContentType controls the type of Web output, but is it case-sensitive?
For example:
Context. Response.ContentType = "Application/json";
Context. Response.ContentType = "Application/json";
Is it the same?
Would have run completely without the problem code, foreground code:
$.ajax ({type: "POST",
Url:urlajax + "?) Operationtype=add ",
Data: $ (formid). Serialize (),
success:function (msg) {
var obj = Jquery.parsejson (msg );
if (obj. Issuccess = = True) {
$.messager.alert (' hint ', obj. MSG, ' info ', saveokcallback);
}
else {
$.messager.alert (' hint ', obj. MSG);
Enablebutton (True);
}
);
Background code:
Context. Response.ContentType = "Application/json";
When I change the background code into
Context. Response.ContentType = "Application/json";
, the front desk has a direct error!! This is the sentence!!
Jquery.parsejson (msg)
No issuccess properties!!!
Finally found out the reason is a case of a problem caused!!
It seems that ContentType is case-sensitive, but I did not find the relevant information!!
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/web/Skills/