|
藍森林 http://www.lslnet.com 2006年8月25日 8:28
請教關於RADIO和JS的問題!!
我現在有一個頁面,裡面有一個iframe(mainframe),mainframe裡有一個iframe(main),而這個main裡又有一個iframe(rmc)。
現在,在mainframe的菜單點new按鈕,彈出一個dialog窗口,窗口裡有7個radio和一個button,我要通過選擇radio並點擊button,令iframe(rmc)跳轉到我需要的頁面,這要怎麼做呢???? |
---index.htm---
<input type=button value=new onclick="showModelessDialog('dl.htm',window,'DialogWidth:300px;DialogHeight:200px;help:no;status:no')"><p>
<iframe name=mainframe width=600 height=400 src=aa.htm></iframe>
---dl.htm---
<input type=radio name=ye value="http://www.163.com" onclick="ye.value=value">網易
<input type=radio name=ye value="http://www.sina.com.cn" onclick="ye.value=value">新浪
<input type=radio name=ye value="http://www.tzvnet.com" onclick="ye.value=value">互聯星空<p>
<input type=radio name=ye value="http://www.blueidea.com/bbs" onclick="ye.value=value">藍色理想
<input type=radio name=ye value="http://www.163.com" onclick="ye.value=value">網易
<input type=radio name=ye value="http://www.sina.com.cn" onclick="ye.value=value">新浪<p>
<input type=radio name=ye value="http://www.tzvnet.com" onclick="ye.value=value">互聯星空<p>
<input type=button value=open onclick="test()"><input type=hidden id=ye>
<script>
function test(){
window.dialogArguments.document.frames.mainframe.document.frames.main.document.frames.rmc.location.href=ye.value;
setTimeout("window.close()",1000);
}
</script>
---aa.htm---
<iframe name=main src=bb.htm width=350 height=250></iframe>
---bb.htm---
<iframe name=rmc></iframe> |
---dl.htm---
window.returnValue = ye.value
window.close()
---rmc.htm---
document.frames.mainframe.document.frames.main.document.frames.rmc.location.href=ye.value |
謝謝啦!搞定了!:) |
能不能把最後的代碼發上來,我想看看。謝謝! |
TO:yexj00
看到此貼請回一下,QQ上找不到你。
我總覺得你的做法好像不對的。但是不能確定,所以想叫樓主把原文件發一下,未果。
所以想和你探討一下,不知道最後的結果是那個取捨?
:) |
可能是你的IE又出問題了, 我發的那個顯示正常的.
PS: 我很少上QQ, 你第一天認識我啊,:D |
|