请教,有没有办法得到页面加载的状态?

jemmylau 2002-07-31 08:20:02
就是做一个页面加载进度的进度显示。
请指点。
谢谢
...全文
104 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
seabell 2002-08-05
  • 打赏
  • 举报
回复
没有加载的百分比之类的属性,可以循环来检测readyState是否为"complete"
可以在msdn上查找到readyState相关属性
jemmylau 2002-08-01
  • 打赏
  • 举报
回复
谢谢
只有这几中固定的状态吗?
有没有加载的百分比之类的属性吗?

还有啊,请问你的第一片文章好象是什么帮助文件吧?
什么资料能不能介绍一下?
推荐给我,谢谢你!
孟子E章 2002-08-01
  • 打赏
  • 举报
回复
<body>
<div id=mxh></div>
<img src="http://lucky.myrice.com/back.jpg">
<script>
function document.onpropertychange()
{
document.all.mxh.innerText+=document.readyState
}
</script>
孟子E章 2002-07-31
  • 打赏
  • 举报
回复
readyState Property

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

Retrieves 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.


The property is read-only. The property has no default value.

Remarks

An object's state is initially set to uninitialized, and then to loading. When data loading is complete, the state of the link object passes through the loaded and interactive states to reach the complete state.

The states through which an object passes is determined by that object; an object can skip certain states (for example, interactive) if the state does not apply to that object.

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧