在提交ajxa数据的时候,服务器明明接受到了post的数据,但是就是接受不到服务器发回的状态,
按F12谷歌报错是这样的:
XMLHttpRequest cannot load http://localhost:8080/BOMO/products/setDivceTypeInForm.No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
解决方案如下:
在谷歌应用商店中找到如下扩展:Allow-Control-Allow-Origin: *
Allow-Control-Allow-Origin: *
点击添加至CHROME,添加成后即可。