首选,安装http-server模块 npm install http-server -g 在需要打开的静态页面的目录下,开启服务即可 http-server 转载于:https://www.cnblogs.com/sangzs/p/10855517.html