• 改变框架大小(解决浏览器不识别)


    <frameset name="myFrame" cols="199,7,*" frameborder="no" border="0" framespacing="0" id="myFrame">
        <frame src="leftframe.jsp" name="leftFrame" frameborder="no" scrolling="No" noresize="noresize" id="leftFrame" title="leftFrame" />
    	<frame src="switchframe.html" name="midFrame" frameborder="no" scrolling="No" noresize="noresize" id="midFrame" title="midFrame" />
        <frameset rows="59,*" cols="*" frameborder="no" border="0" framespacing="0">
             <frame src="mainframe.html" name="mainFrame" frameborder="no" scrolling="No"  noresize="noresize" id="mainFrame" title="mainFrame" />
             <frame src="fuwuqi.jsp" name="manFrame" frameborder="no"   id="manFrame" title="manFrame" />
         </frameset>
      </frameset>
    

      

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="css/common.css" type="text/css" />
    <title>显示/隐藏左侧导航栏</title>
    </head>
    <script language="JavaScript">
    	function Submit_onclick()
    	{
    		alert(window.parent.document.getElementById("myFrame").cols);
    		if(window.parent.document.getElementById("myFrame").cols == "199,7,*") {
    	        window.parent.document.getElementById("myFrame").cols ="0,7,*";
    	        document.getElementById("ImgArrow").src="images/switch_right.gif";
    	        document.getElementById("ImgArrow").alt="打开左侧导航栏";
    	    } else {
    	        window.parent.document.getElementById("myFrame").cols="199,7,*";
    	        document.getElementById("ImgArrow").src="images/switch_left.gif";
    	        document.getElementById("ImgArrow").alt="隐藏左侧导航栏";
    	    }
    	}
    	window.onload=function()
    	{
    		if(window.parent.location.href.indexOf("MainUrl")>0) 
    		{
    			window.top.midFrame.document.getElementById("ImgArrow").src="images/switch_right.gif";
    		}
    	}
    </script>
    <body >
    <div id="switchpic"><a href="javascript:Submit_onclick()"><img src="images/switch_left.gif" alt="隐藏左侧导航栏" id="ImgArrow" /></a></div>
    </body>
    </html>
    

      

  • 相关阅读:
    Ajax_ajax模板引擎 ---tmplate.js处理数据和标签拼接
    Ajax_ajax请求中的跨域问题---浏览器不允许ajax跨域获取服务器数据,那我们就用jsonp来实现跨域
    Ajax_jquery库中Ajax方法的使用
    第一阶段冲刺 second day
    第11周周总结
    用户场景分析
    第一阶段冲刺 first day
    第10周周总结
    第9周周总结
    查找水王
  • 原文地址:https://www.cnblogs.com/xiaofanke/p/3690197.html
Copyright © 2020-2023  润新知