html奇怪的相对路径 大家帮帮忙

zhouzhiyuan1985 2009-11-05 10:31:27
index.html在 d:\zzy里
test.html在d:\zzy\test里
aa.js在d:zzy\js里

在index.html用location.replace('d:\zzy\test\test.html')方法转向到test.html后
test.html中要将js的引入路径设为
<script language="javascript" src="../../js//aa.js"></script>才能有效

<script language="javascript" src="../js//aa.js"></script>却无效啊

为什么啊 按理说 应该第二个是对的啊 现在反而不行 请大家给说个里
...全文
67 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
fx_blog 2009-11-07
  • 打赏
  • 举报
回复
对于window 2003 跟 xp的IIS路径是有区别的

应该以网络服务器为准.
zhouzhiyuan1985 2009-11-06
  • 打赏
  • 举报
回复
会的 谁有qq号 我给他发下程序
xb520hh 2009-11-06
  • 打赏
  • 举报
回复
不会出现这种情况吧
zhouzhiyuan1985 2009-11-06
  • 打赏
  • 举报
回复
what's the mean can you speak chinese
msdnlu 2009-11-06
  • 打赏
  • 举报
回复
The replace( ) method of the Location object loads and displays a new document. Loading a document in this way is different from simply setting location or location.HRef in one important respect: the replace( ) method does not generate a new entry in the History object. When you use replace( ), the new URL overwrites the current entry in the History object. After calling replace( ), the browser's Back button does not return you to the previous URL; it returns you to the URL before that one.

FROM:JavaScript The Definitive Guide, 5th Edition.chm
打字员 2009-11-06
  • 打赏
  • 举报
回复
照道理是不可能出现这样的情况的。。。

natineprince 2009-11-05
  • 打赏
  • 举报
回复
我这边测试了好几次也没有遇到楼主说的情况哦...

87,993

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧