web项目中父页面加载子页面报Failed to load resource: the server responded with a status of 404 (Not Found)

web项目中父页面加载子页面报Failed to load resource: the server responded with a status of 404 (Not Found)

父子页面单独打开,不报错,但是父页面加载子页面时,报这个错。

子页面引用路径:

web项目中父页面加载子页面报Failed to load resource: the server responded with a status of 404 (Not Found)

 

父页面home.html加载子页面时,把子页面的引用路径,改成     /项目名/layui/xx.js就好了。

归根结底,是路径的事。

web项目中父页面加载子页面报Failed to load resource: the server responded with a status of 404 (Not Found)