ajax请求ashx跨域问题解决办法
1
|
context.Response.AddHeader( "Access-Control-Allow-Origin" , "*" ); |
2.ajax请求,要声明cors,在ajax第一行代码声明一次:
1
|
jQuery.support.cors = true ; |
1
|
context.Response.AddHeader( "Access-Control-Allow-Origin" , "*" ); |
1
|
jQuery.support.cors = true ; |