onresize Event Internet Development Index --------------------------------------------------------------------------------Fires when the size of the object is about to change. SyntaxInline HTML <ELEMENT onresize = "handler" ... > All platforms
Event property object.onresize = handler JScript only
object.onresize = GetRef("handler") Visual Basic Scripting Edition (VBScript) 5.0 or later only
Named script <SCRIPT FOR = object EVENT = onresize> Internet Explorer only Event InformationBubbles No
Cancels No
To invoke Change the height or width of the object.
Default action No default action. Event Object PropertiesAlthough event handlers in the DHTML Object Model do not receive parameters directly, a handler can query an event object for data.Show Available PropertiesaltKey Sets or retrieves a value that indicates the state of the ALT key.
altLeft Sets or retrieves a value that indicates the state of the left ALT key.
clientX Sets or retrieves the x-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
clientY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
ctrlKey Sets or retrieves the state of the CTRL key.
ctrlLeft Sets or retrieves the state of the left CTRL key.
offsetX Sets or retrieves the x-coordinate of the mouse pointer's position relative to the object firing the event.
offsetY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the object firing the event.
returnValue Sets or retrieves the return value from the event.
screenX Retrieves the x-coordinate of the mouse pointer's position relative to the user's screen.
screenY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the user's screen.
shiftKey Sets or retrieves the state of the SHIFT key.
shiftLeft Retrieves the state of the left SHIFT key.
srcElement Sets or retrieves the object that fired the event.
type Sets or retrieves the event name from the event object.
x Sets or retrieves the x-coordinate, in pixels, of the mouse pointer's position relative to a relatively positioned parent element.
y Sets or retrieves the y-coordinate, in pixels, of the mouse pointer's position relative to a relatively positioned parent element. ResThe onresize event fires for block and inline objects with layout, even if document or CSS (cascading style sheets) property values are changed. Objects have layout when measurements such as the height and width attributes are set, or when the position of the object is set. Intrinsic objects, such as button, and windowed objects, such as window and iframe, fire as expected. This event does not fire for files with embedded controls.Resizing HTML applications also fires the onresize event.
Event property object.onresize = handler JScript only
object.onresize = GetRef("handler") Visual Basic Scripting Edition (VBScript) 5.0 or later only
Named script <SCRIPT FOR = object EVENT = onresize> Internet Explorer only Event InformationBubbles No
Cancels No
To invoke Change the height or width of the object.
Default action No default action. Event Object PropertiesAlthough event handlers in the DHTML Object Model do not receive parameters directly, a handler can query an event object for data.Show Available PropertiesaltKey Sets or retrieves a value that indicates the state of the ALT key.
altLeft Sets or retrieves a value that indicates the state of the left ALT key.
clientX Sets or retrieves the x-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
clientY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
ctrlKey Sets or retrieves the state of the CTRL key.
ctrlLeft Sets or retrieves the state of the left CTRL key.
offsetX Sets or retrieves the x-coordinate of the mouse pointer's position relative to the object firing the event.
offsetY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the object firing the event.
returnValue Sets or retrieves the return value from the event.
screenX Retrieves the x-coordinate of the mouse pointer's position relative to the user's screen.
screenY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the user's screen.
shiftKey Sets or retrieves the state of the SHIFT key.
shiftLeft Retrieves the state of the left SHIFT key.
srcElement Sets or retrieves the object that fired the event.
type Sets or retrieves the event name from the event object.
x Sets or retrieves the x-coordinate, in pixels, of the mouse pointer's position relative to a relatively positioned parent element.
y Sets or retrieves the y-coordinate, in pixels, of the mouse pointer's position relative to a relatively positioned parent element. ResThe onresize event fires for block and inline objects with layout, even if document or CSS (cascading style sheets) property values are changed. Objects have layout when measurements such as the height and width attributes are set, or when the position of the object is set. Intrinsic objects, such as button, and windowed objects, such as window and iframe, fire as expected. This event does not fire for files with embedded controls.Resizing HTML applications also fires the onresize event.
解决方案 »
- js字符串和Byte[] 互转
- jsp页面的IP参数传递给调用的ocx控件问题,
- 怎样能用几行简单的代码 让其无缝滚动????
- 怎样简写这段代码,就是只要定义一次form名字,下面不用再输了
- 关于使用AlphaImageLoader装载png透明图的问题--急.
- 插件内部的div 无法APPEND 元素
- 求教!!!怎样写网页对话框中的重置按钮的JS???分不多,但一定给教我的人!
- 怎么才能让Flash不挡住我的菜单显示!!!!!!!!!!!!!!!!!!!!!!!1
- 网页传数据问题
- 求半角英数字的CHECK.
- 急,表单列表菜单的问题。
- 实在看不懂这段JavaScript代码,那位能帮一下忙?可否变成VBScript?
NAME='PICC_CoverInfo'
ID='PICC_CoverInfo'
FRAMEBORDER=0
marginWidth="0"
marginHeight="0"
scrolling=no
width="100%"
onload='var f=document.all["PICC_CoverInfo"]; var b=f.Document.body; f.height=b.scrollHeight'>
</iframe>
得到的高度总是只有200象素左右。能不能让iframe的高度总是比在它外面的table小20象素(iframe随着table变化),而table为100% ?
B是被加在A中的TABLE中间的.你想在A页面的大小进行改动的时候.iframe的宽度也进行相应改动.这里有两个方法.第一,因为你的table的width是:100%,那么如果你想要让里面的iframe也进行自动伸缩.把width的值也设置为100%就好了.如果有问题.你可以看你的iframe所调用的页面中的代码写发.如果在B页面中的BODY设置为:10.那么即使你的iframe设置为:100%.里面所看见的也只有10.虽然你的框架是:100%.第二,你可以通过onResize时间来更改你的iframe框架.
先给iframe给一个标识.然后根据时间的出发更改他的width的值.
<iframe name=ifm onload="this.height=ifm.document.body.scrollHeight+10">看起来是合理地,只是不知道阁下是否有运行过呀?我在我的环境:Win2000 Adv Server, IE 6.0.2800 下试过是不行的,会报错!!!