在WSH中怎么样写InternatExplore的DocumentComplete事件?
<job id="IncludeExample">
<script language="JScript" >
var ie;
ie = WScript.CreateObject("InternetExplorer.Application");
ie.navigate("os.abc");
ie.visible = 1;
//当InternetExplorer的文档加载完毕时,做其它事情
</script>
</job>
请问下怎么写InternetExplorer的DocumentComplete事件,以判断文档的加载情况?:em14: <job id="IncludeExample">
<script language="JScript" >
var ie;
var isQuit = false;
function _eventsDocumentComplete(obj,url)//文档加载完毕事件
{
WScript.Echo("'"+url+"'"+"loaded.");
}
function _eventsOnQuit()//浏览器退出事件
{
isQuit = true;
}
ie = WScript.CreateObject("InternetExplorer.Application","_events");//创建IE实例并设置以_events开头的函数为事件处理函数
ie.navigate("http://os.abc");//
ie.visible = 1;
while(!isQuit)
{
WScript.sleep(100);
}
</script>
</job>问题已解决,代码如上:lol
页:
[1]