Chinaunix

标题: 怎样判断iframe的状态,如页面读取是否完毕等? [打印本页]

作者: 飞龙在天super    时间: 2007-03-01 09:12
标题: 怎样判断iframe的状态,如页面读取是否完毕等?
怎样判断iframe的状态,如页面读取是否完毕等? 先行谢过。
作者: yueliangdao0608    时间: 2007-03-02 09:22
readyState Property  Internet Development Index

--------------------------------------------------------------------------------

Retrieves a value that indicates the current state of the object.

Syntax

HTML N/A
Scripting [ sState = ] object.readyState

Possible Values

sState String that receives one of the following values.uninitialized Object is not initialized with data.
loading Object is loading its data.
loaded Object has finished loading its data.
interactive User can interact with the object even though it is not fully loaded.
complete Object is completely initialized.
作者: HonestQiao    时间: 2007-03-02 12:27
原帖由 飞龙在天super 于 2007-3-1 09:12 发表
怎样判断iframe的状态,如页面读取是否完毕等? 先行谢过。

如果是仅仅判断页面读取完成了(不包含图片啊,脚本什么的),则很简单:

iframe的html最后写上脚本:top.某个函数() 来触发操作即可。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2