我想要在enthideshow.htm中写一个JavaScript代码,按一下按钮将index.jsp中的id为leftFrame的Frame隐藏或打开,由id为mainframe的Frame填充leftFrame隐藏的空间,写了一点不能实现,大家帮忙改改好吗。
------------index.jsp代码-------------------<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
<!-- saved from url=(0050)http://www.hsbank.cc/demo/ent1/mainpageqy_sys.html -->
<HTML><HEAD><TITLE>»ÕÉÌÒøÐÐÍøÉÏÒøÐÐ</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2132">
<META content="MSHTML 6.00.2900.3157" name=GENERATOR></HEAD>
<FRAMESET border=0 frameSpacing=0 rows=123,*,40 frameBorder=0 cols=*>
<FRAME name=top src="enttop.htm" noResize scrolling=no target="middle" > <FRAMESET id="myFrameset" name="myFrameset" frameSpacing=0 rows=* frameBorder=0 cols=163,22,*>
<FRAME id="leftFrame" name="leftFrame" marginWidth=0 marginHeight=0 src="left_2.jsp" frameBorder=no scrolling=yes>
<FRAME id="inter" name="inter" marginWidth=0 borderColor=#ffffff src="enthideshow.htm" frameBorder=0 >
<FRAME id="mainFrame" name="mainFrame" src="" frameBorder=0 scrolling=yes>
</FRAMESET> <FRAME name="bottom" src="entbottom.htm" scrolling=yes
target="contents"><NOFRAMES>
<body>
<p>´ËÍøҳʹÓÃÁË¿ò¼Ü£¬µ«ÄúµÄä¯ÀÀÆ÷²»Ö§³Ö¿ò¼Ü¡£</p>
<p>Your IE browser does not support frame.</p>
</body>
</NOFRAMES></FRAMESET></HTML> ----------------enthideshow.htm-----------------------
<script>
function onOff(){
if(window.top.document.body.cols!="0,22,*"){
window.top.document.body.cols="0,22,*";
}else{
window.top.document.body.cols="163,22,*";
}
}
</SCRIPT>
<BODY leftMargin=0 background=/images/tmpimages/enthideshow.htm topMargin=0>
<TABLE class=rrr_1 height="100%" cellSpacing=0 cellPadding=0 width=0%
align=center border=0 >
<TBODY>
<TR>
<TD vAlign=top>
<P> </P>
<P> </P>
<P> </P>
<P><IMG onClick="onOff()" height=43 src="/images/tmpimages/hidden.gif"
width=14></P></TD></TR></TBODY></TABLE></BODY></HTML>
---------------------enttop.htm--------------------- <TBODY>
<TR>
<TD><img height=105 src="/images/title_left.jpg" width=680></TD>
<TD>
<DIV align=right><IMG height=105 src="/images/main_hui_04.jpg"
width=483></DIV></TD></TR></TBODY></TABLE>
<TABLE height=21 cellSpacing=0 cellPadding=0 width="100%" bgColor=#d7141c
border=0>
<TBODY>
<TR>
<TD></TD></TR></TBODY></TABLE></BODY></HTML>
------------index.jsp代码-------------------<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
<!-- saved from url=(0050)http://www.hsbank.cc/demo/ent1/mainpageqy_sys.html -->
<HTML><HEAD><TITLE>»ÕÉÌÒøÐÐÍøÉÏÒøÐÐ</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2132">
<META content="MSHTML 6.00.2900.3157" name=GENERATOR></HEAD>
<FRAMESET border=0 frameSpacing=0 rows=123,*,40 frameBorder=0 cols=*>
<FRAME name=top src="enttop.htm" noResize scrolling=no target="middle" > <FRAMESET id="myFrameset" name="myFrameset" frameSpacing=0 rows=* frameBorder=0 cols=163,22,*>
<FRAME id="leftFrame" name="leftFrame" marginWidth=0 marginHeight=0 src="left_2.jsp" frameBorder=no scrolling=yes>
<FRAME id="inter" name="inter" marginWidth=0 borderColor=#ffffff src="enthideshow.htm" frameBorder=0 >
<FRAME id="mainFrame" name="mainFrame" src="" frameBorder=0 scrolling=yes>
</FRAMESET> <FRAME name="bottom" src="entbottom.htm" scrolling=yes
target="contents"><NOFRAMES>
<body>
<p>´ËÍøҳʹÓÃÁË¿ò¼Ü£¬µ«ÄúµÄä¯ÀÀÆ÷²»Ö§³Ö¿ò¼Ü¡£</p>
<p>Your IE browser does not support frame.</p>
</body>
</NOFRAMES></FRAMESET></HTML> ----------------enthideshow.htm-----------------------
<script>
function onOff(){
if(window.top.document.body.cols!="0,22,*"){
window.top.document.body.cols="0,22,*";
}else{
window.top.document.body.cols="163,22,*";
}
}
</SCRIPT>
<BODY leftMargin=0 background=/images/tmpimages/enthideshow.htm topMargin=0>
<TABLE class=rrr_1 height="100%" cellSpacing=0 cellPadding=0 width=0%
align=center border=0 >
<TBODY>
<TR>
<TD vAlign=top>
<P> </P>
<P> </P>
<P> </P>
<P><IMG onClick="onOff()" height=43 src="/images/tmpimages/hidden.gif"
width=14></P></TD></TR></TBODY></TABLE></BODY></HTML>
---------------------enttop.htm--------------------- <TBODY>
<TR>
<TD><img height=105 src="/images/title_left.jpg" width=680></TD>
<TD>
<DIV align=right><IMG height=105 src="/images/main_hui_04.jpg"
width=483></DIV></TD></TR></TBODY></TABLE>
<TABLE height=21 cellSpacing=0 cellPadding=0 width="100%" bgColor=#d7141c
border=0>
<TBODY>
<TR>
<TD></TD></TR></TBODY></TABLE></BODY></HTML>
解决方案 »
- tomcat官方文档为什么不提供离线下载呢?
- 怎么通过requst获取的Excel文件路径参数,把文件里的数据保存到数据库里?
- jsp登陆页面
- web技术连接sqlserver数据库
- 用泛解析的域名访问网站登陆问题
- apache-tomcat不能开机自动启动?
- struts 中 “html:file” 标签的问题!!在线等!!!
- 急疯了的菜鸟~tomcat5.5不会弄了?
- 如果用户的浏览器没有按照Java虚拟机,如何让它从我们的web服务器上下载并安装,以便运行Applet?
- 急救jsp平台搭建问题
- 找工作,基于J2EE的WEB开发
- 有关Jsp结合XML+XSLT将输出转换为Html格式的问题: 在tomcate下可以正常运行,当在Jboss环境下运行出错
function onOff(){
if(window.parent.document.getElementsByTagName("frameset")[1].cols!="0,22,*"){
window.parent.document.getElementsByTagName("frameset")[1].cols="0,22,*";
}else{
window.parent.document.getElementsByTagName("frameset")[1].cols="163,22,*";
}
}
我试过了可以...
cols="0,*"设置此标签的cols属性 设为1的表示取第二个<frameset>标签...
<div id="a"></div><div id="b"></div>
doucment.getElementById("a").style.display="none";
document.getElementById("b").style.display="block";