相对路径和绝对路径介绍

 代码实例

function b() {
//相对路径,跳出当前符号是(../),进入目录路径(html/a.html)
window.location.href="../html/a.html" ;
// 绝对路径(去掉WebRoot既可以了)/FFFFFFF/WebRoot/test1/html/test1.html
window.location.href="/FFFFFFF/test1/html/a.html" ;
}

 示意图

 

posted @ 2018-06-03 17:35  wutao1234  阅读(145)  评论(0编辑  收藏  举报