ajax使用应该是有web容器的情况下使用,否则会报错,错误信息如下:
[color=orange]XMLHttpRequest cannot load http://localhost:8080/myproject/weather. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. [/color]
[color=orange]XMLHttpRequest cannot load http://localhost:8080/myproject/weather. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. [/color]