框架左右隐藏

index
<FRAMESET border=0 name=mainframe frameSpacing=0 borderColor=#ffffff frameBorder=NO cols=200,10,*>
	<FRAME name=menuTree src="<s:url value="/EM/queryCategoryList.action"/>" noResize scrolling=no>
	<FRAME name=middleDivision src="<s:url value="/EM/displayBar.action" />"noResize scrolling=no>
	<FRAME name=main src="" noResize>
</FRAMESET>

 

			function changeState()
			{
			    if(parent.document.getElementById('mainframe').cols!="200,10,*")
			    {
			  	    parent.document.getElementById('mainframe').cols="200,10,*";
			  	    parent.document.getElementById('menuTree').style.display="";
			  	    image1Id.src = "<s:url value="/img/scroll_left.gif"/>";
			    }
			    else
			    {
			  	    parent.document.getElementById('mainframe').cols = "0,10,*";
			  	    parent.document.getElementById('menuTree').style.display="none";
			  	    image1Id.src = "<s:url value="/img/scroll_right.gif"/>";
			  	  
			    }
			}

 

<TABLE height="100%" cellSpacing=0 cellPadding=0 border=0>
			<TBODY>
				<TR>
					<TD class="left_scroll_bg" height="100%">
						<IMG id=image1Id
							src="<s:url value="/img/scroll_left.gif"/>"
							 style="cursor:pointer;"  onClick="changeState();" width="10" height="51" border="0"
							>
					</TD>
				</TR>
			</TBODY>
		</TABLE>

 

你可能感兴趣的:(框架)