thyx 2006-7-17 15:32
怎么知道浏览器对一个页面的下载是否已经完成?
写一个自动化测试工具,需要测试各种浏览器,在下载完成后实现抓屏,如何知道已经下载完成?
vigo 2006-10-15 01:15
document有一个状态表示页面是否加载完毕readyState
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.
可以通过判断这个值来确定是否加载完毕。