ajax cross domain solutions to problems (jsonp use)

Error message:

 

 

It is due to fill in the url in ajax: "http://10.176.220.60:8080/SSM/login" contains the IP address, default cross-domain result in:

Solution: datatype using jsonp implement them in ajax

dataType: "jsonp", 
jsonp: "callbackparam",

Jsonp needed support in the servlet:

 

Guess you like

Origin www.cnblogs.com/changhuiming/p/11720756.html