当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM complete属性

HTML DOM
DOM TableRow 对象
DOM Textarea 对象
DOM Window 对象

HTML DOM complete属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 406 ::
收藏到网摘: n/a

Definition and Usage
定义与用法

The complete property returns whether or not the browser has finished loading the image.
complete属性可以返回图片是否已经加载完毕

If the image is finished loaded it returns true, otherwise it returns false.
如果加载完毕就返回true,否则就是false

Syntax
语法

imageObject.complete


Example
举例

The following example checks if the image is finished loaded on body onload:
下面举例中我们将检查图片在body onload时是否加载完毕:

<html>
<head>
<script type="text/javascript">
function alertComplete()
{
alert(document.getElementById("compman").complete)
}
</script>
</head>

<body onload="alertComplete()">
<img id="compman" src="compman.gif" alt="Computerman"
width="107" height="98" />
</body>
</html>


Try-It-Yourself Demos
尝试与演示

Check if the image is finished loaded
检查图片是否加载完毕

评论 (0) All

登陆 | 还没注册?