jquery.min.js:6 XMLHttpRequest cannot load file:. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
这是因为ajax只支持 http, data, chrome, chrome-extension, https, chrome-extension-resource.这几种协议,没有file,而在使用jquery mobile,framework等框架中,使用单页应用的原理是使用ajax加载页面,其中页面是去除head的,这种方式在移动端web中是最常用的。
故在运行此类框架时,需要运行http服务器,nodejs,nginx等。