请教微软的高手

kilobird 2002-10-25 09:15:07
我写了一段代码做如下一件事
由窗体A window.open 窗体B
再由窗体B改变窗体A某个text的value值
既 window.opener.objectname.value=
然后关闭窗体B

问题是:在IE6环境下使用127.0.0.1、localhost、机器的IP地址都会报这样一个错
没有权限
window.opener.objectname
但是使用机器名没问题
用IE5.5任何情况下都没问题

请高手指教
急!
...全文
22 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
kilobird 2002-10-25
  • 打赏
  • 举报
回复
saucer的方法我试过了,只有机器名可以,其他任何URL都不行

为什么IE5.5没有这个问题,我想可能是两者机制不同,
saucer 2002-10-25
  • 打赏
  • 举报
回复
I am not 微软的高手, but I hope I can help you in some way

under normal circumstances, the browser forbids you to access other pages' DOM from another domain. Sometimes, the browser is not smart enough to know that "127.0.0.1" or "localhost" or your machine name refers to the same thing. So when you open the new page, do not use absolute url, but use relative url instead
YP2002CN 2002-10-25
  • 打赏
  • 举报
回复
使用target去改

87,986

社区成员

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

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