当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM noResize属性

HTML DOM
DOM 介绍
HTML DOM 举例
DOM 参考
DOM 摘要
HTML DOM 实例
DOM Anchor
DOM Applet
DOM Area
DOM Base 对象
DOM Basefont对象
DOM Body 对象
DOM Document 对象
DOM 事件
DOM Form 对象
DOM Frame 对象
DOM Frameset 对象
DOM History
DOM Iframe 对象
DOM Image 对象
HTML DOM Button对象

HTML DOM noResize属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 498 ::
收藏到网摘: n/a

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

登陆 | 还没注册?