ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: HTML DOM :: HTML DOM noResizeÊôÐÔ

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

HTML DOM noResizeÊôÐÔ


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:1955 :: ::

The noResize property sets or returns whether or not a frame can be resized.noResize
noResizeÊôÐÔ¿ÉÒÔÉèÖûò·µ»Ø¿ò¼ÜÊÇ·ñ¿ÉÒÔÖØÖôóС

Syntax
Óï·¨

frameObject.noResize=true|false


Example
¾ÙÀý

In our example we will first create an HTML document containing a frameset with two columns. Each column is set to 50% of the browser window:
¾ÙÀýÖÐÎÒÃǽ«½¨Á¢Ò»¸öHTMLÎĵµ£¬ÀïÃæ°üº¬Ò»¸ö´øÓÐÁ½ÁеĿò¼Ü¼¯¡£Ã¿¸öÁпíΪä¯ÀÀÆ÷´°¿Ú×Ü¿í¶ÈµÄ50%:

<html>
  <frameset cols="50%,50%">
    <frame id="leftFrame" src="frame_noresize.htm">
    <frame id="rightFrame" src="frame_a.htm">
  </frameset>
</html>

The HTML document "frame_noresize.htm" is put into the first column, and the HTML document "frame_a.htm" is put into the second column.
"frame_noresize.htm"Ϊ·ÅÔÚµÚÒ»¸öÁеÄHTMLÎĵµ£¬"frame_a.htm"ÔòΪ·ÅÔÚµÚ¶þÁеÄÎĵµ

The source of "frame_noresize.htm" is as follows:
"frame_noresize.htm"µÄ´úÂëÈçÏ£º

<html>
<head>
<script type="text/javascript">
function disableResize()
  {
  parent.document.getElementById("leftFrame").noResize=true
  parent.document.getElementById("rightFrame").noResize=true
  }
function enableResize()
  {
  parent.document.getElementById("leftFrame").noResize=false
  parent.document.getElementById("rightFrame").noResize=false
  }
</script>
</head>
<body>
<input type="button" onclick="disableResize()" value="No resize" />
<input type="button" onclick="enableResize()" value="Resize" />
</body>
</html>


Try-It-Yourself Demos
³¢ÊÔÓëÑÝʾ

Resizable and not resizable frames
µ÷Õû¿ò¼ÜÊÇ·ñ¿ÉÒÔÖØÖôóС

ÆÀÂÛ (0) All