Ajax itself is not support cross-domain, cross-domain problem is actually very simple, through the corresponding browser settings can be completed two different servers or two different services under the project Mutual access. I hope members will give their comments and vote.
Method/Step
- 1
First right-click on Google shortcut and select Properties from the drop-down list.
- 2
Open the Properties window and switch to the Shortcut tab below, which is the General tab by default.
- 3
Add "--disable-web-security" after the target path, in the following format: C:\Users\Administrator\AppData\Local\Google\Chrome\Application\ Chrome.exe--disable-web-security, where there is a space between Chrome.exe and--disable
- 4
Click Apply, then click OK to close the window.
- 5
If the path in the target contains double quotation marks, it is added outside the double quotation marks.
- 6
Turning off the browser to reopen the browser via the desktop shortcut, the browser prompts "you are using an unsupported command line tag:--disable-web-security." Stability and security will decrease ", stating that the settings were successful.
Baidu experience copied, the original address: http://jingyan.baidu.com/article/7c6fb4281d685780642c900a.html
Local debugging Chrome supports AJAX cross-domain