蓝森林首页 | 返回主页 | 本站地图 | 站内搜索 | 联系信箱 |
 您目前的位置:首页 > 自由软件 > 技术交流 > 应用编程


    

蓝森林 http://www.lslnet.com 2006年8月25日 8:28

JAVASCRIPT实现框架到首页的跳转问题~

各位大峡
     我在左框架里定义一个按钮,想实现点击按钮,跳转到首页,但不想在此框架内打开
我该怎么做?
左框架里:

<script language="JavaScript" type="text/javascript">
function menuSubmit(sname) {
    if (sname == "转向首页") {
    document.location="http://localhost:8080/WEBOA";
        //parent.close();
    }                 
}
</script>

按钮:

<img onclick="menuSubmit('退出系统') "
src="<%=request.getContextPath()%>/images/Kroute_mright.png">
<a href="###" onclick="menuSubmit('转向首页') ">转向首页</a>

通过上面的代码只能实现在左框架里显示首页,首页右半部分被右框架给挡上了
我怎么做才能不弹出新页面的前提下得到完整的首页呢?
大虾帮忙!~

[code]
<script language="JavaScript" type="text/javascript">
function menuSubmit(sname) {
if (sname == "转向首页") {
top.location="http://localhost:8080/WEBOA";
//parent.close();
}
}
</script>[/code]




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 蓝森林网站 版权所有。 E-mail : webmaster@lslnet.com