tcrct 2008-10-12 07:55:18 有以下一句代码:
<a herf="javascript:void(0)" onclick="javascript:test('../admin/jsp/test.jsp')" >test</a>
function test(url){
window.parent.openpage(url);
}
在父窗口里:
function openpage(entUrl){
alert(entUrl);
window.frames.sampleframe.location.href = entUrl
}
在这里的父窗口是的alert能打印出传过来的值,但不知道为什么iframe里的href没动作,看了一下,IE窗口里的进度条也刷了一下的,但为什么没动作呢?后来我将<a></a>锚标记改为:
<a herf="javascript:test('../admin/jsp/test.jsp')" >test</a>
又可以了,但不知道这是什么原因呢?请各位高手说说看.