Input Image 對象是 HTML5 中的新對象。
Input Image 對象表示 HTML <image> 元素。
您可以通過使用 getElementById() 來訪問 <image> 元素:
var x = document.getElementById("myImage");
提示:您也可以通過遍歷表單的 elements 集合來訪問 Input Image 對象。
您可以通過使用 document.createElement() 方法來創(chuàng)建 <image> 元素:
var x = document.createElement("INPUT"); x.setAttribute("type", "image");
屬性 | 描述 |
---|---|
autocomplete | 設(shè)置或返回 email 字段的 autocomplete 屬性值。 |
alt | 設(shè)置或返回 input image 的 alt 屬性值。 |
autofocus | 設(shè)置或返回 input image 在頁面加載后是否應(yīng)自動獲取焦點(diǎn)。 |
defaultValue | 設(shè)置或返回 input image 的默認(rèn)值。 |
disabled | 設(shè)置或返回 input image 是否被禁用。 |
form | 返回對包含 input image 的表單的引用。 |
formAction | 設(shè)置或返回 input image 的 formaction 屬性值。 |
formEnctype | 設(shè)置或返回 input image 的 formenctype 屬性值。 |
formMethod | 設(shè)置或返回 input image 的 formmethod 屬性值。 |
formNoValidate | 設(shè)置或返回在提交表單時是否應(yīng)該驗(yàn)證表單數(shù)據(jù)(form-data)。 |
formTarget | 設(shè)置或返回 input image 的 formtarget 屬性值。 |
height | 設(shè)置或返回 input image 的 height 屬性值。 |
name | 設(shè)置或返回 input image 的 name 屬性值。 |
src | 設(shè)置或返回 input image 的 src 屬性值。 |
type | 返回 input image 字段的表單元素類型。 |
value | 設(shè)置或返回 input image 的 value 屬性值。 |
width | 設(shè)置或返回 input image 的 width 屬性值。 |
如對本文有疑問,請?zhí)峤坏浇涣髡搲瑥V大熱心網(wǎng)友會為你解答?。?點(diǎn)擊進(jìn)入論壇
Powered by 365建站網(wǎng) RSS地圖 HTML地圖
copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號