w3pop.com :: ÍøÂçѧԺ :: HTML DOM :: HTML DOM noResizeÊôÐÔ
The noResize property sets or returns whether or not a frame can be resized.noResize
noResizeÊôÐÔ¿ÉÒÔÉèÖûò·µ»Ø¿ò¼ÜÊÇ·ñ¿ÉÒÔÖØÖôóС
frameObject.noResize=true|false |
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> |
Resizable and not resizable frames
µ÷Õû¿ò¼ÜÊÇ·ñ¿ÉÒÔÖØÖôóС
ÆÀÂÛ (0)
All