프레임 크기 변경(브라우저 인식 안 함 해결)

2936 단어 브라우저
<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>


좋은 웹페이지 즐겨찾기