HTMLImageElement
The HTMLImageElement 接口提供了特别的属性和方法 (除了常见的对象 HTMLElement 接口提供的属性和方法通过继承也能获取到)来操纵 <img> 元素的布局和图像.
HTMLImageElement()
继承层次
Object.prototype
Function.prototype
EventTarget
Node
Element
HTMLElement
HTMLImageElement
构造函数
程序不能直接调用该构造函数,否则将会产生异常。
属性列表
方法列表
HTMLImageElement.prototype
Object.prototype
EventTarget.prototype
Node.prototype
Element.prototype
HTMLElement.prototype
HTMLImageElement.prototype
属性列表
| 语法 | 说明 |
|---|---|
| align | 是一个 DOMString 表明图像如何对齐它周围的内容。 |
| alt | 设置或返回无法显示图像时的替代文本。 |
| border | 设置或返回图像周围的边框。 |
| complete | 返回浏览器是否已完成对图像的加载。 |
| height | 设置或返回图像的高度。 |
| hspace | 设置或返回图像左侧和右侧的空白。 |
| isMap | 返回图像是否是服务器端的图像映射。 |
| longDesc | 设置或返回指向包含图像描述的文档的 URL。 |
| lowsrc | 设置或返回指向图像的低分辨率版本的 URL。 |
| name | 设置或返回图像的名称。 |
| src | 设置或返回图像的 URL。 |
| useMap | 设置或返回客户端图像映射的 usemap 属性的值。 |
| vspace | 设置或返回图像的顶部和底部的空白。 |
| width | 设置或返回图像的宽度。 |
方法列表
| 语法 | 说明 |
|---|---|
| - | - |
HTMLImageElement实例
Object.prototype
EventTarget.prototype
Node.prototype
Element.prototype
HTMLElement.prototype
HTMLImageElement.prototype
HTMLImageElement 实例