作者ericiori (ericiori)
看板Web_Design
标题[问题] IE7 中javascript问题
时间Tue Jan 15 16:35:28 2008
请问各位大大
我在asp中使用
a.asp(fram页面)→b.asp
而b.asp的程式中使用
Response.Write "parent.location.href = "
http://xxx.asp"
在ie6会转到xxx.asp页面,很正常
而在ie7中会变成另外开新的视窗(xxx.asp),请问有无解决方法?
先感谢~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 210.68.117.124
1F:推 dingyuchi:怎麽不用response.redirect ?? 01/15 17:16
2F:→ ericiori:因为A那页是有切fram的,用redirect只是改变fram那一页 01/15 17:41
3F:→ ericiori:一块,我希望的是整个页面变成在xxx.asp那页 01/15 17:42
4F:→ starjou:parent 改成 top? 01/15 17:50
5F:→ ericiori:用top是ok的~先感谢starjou大,但是我忘了补充说明a程式 01/15 17:57
6F:→ ericiori:中是三层的fram的,而b是在第三层的fram中,top会回到最 01/15 17:57
7F:→ ericiori:上层的fram,但如果我希望是回到第二层的fram中,是否有 01/15 17:59
8F:→ ericiori:方法呢? 01/15 17:59
9F:→ starjou:从 top 去指定第二层的 frame name 01/15 21:11
10F:→ ericiori:试过罗,但是没用ie7中没有效果,我也觉的很奇怪.... 01/16 13:25
11F:→ starjou:假设你的frame 只有一个 try top.window.frames[0].docume 01/17 04:00
12F:→ starjou:nt.location 试试? 01/17 04:01
13F:→ starjou:或是给 frame 一个名字然後 top.document.getElementById( 01/17 04:01
14F:→ starjou:'frame_name').location 之类的东东 01/17 04:01
15F:→ starjou:我是说给一个 id getElementById 後面要接啥再试一下 01/17 04:02
16F:→ ericiori:top.document.getElementById("XX").location是不行,不 01/18 18:04
17F:→ ericiori:过src就ok罗~不过还是谢谢starjou大的提示^^ 01/18 18:05