五月综合缴情婷婷六月,色94色欧美sute亚洲线路二,日韩制服国产精品一区,色噜噜一区二区三区,香港三级午夜理伦三级三

您現(xiàn)在的位置: 365建站網(wǎng) > 建站教程 > JavaScript 教程 > HTML DOM Input Image 對象

HTML DOM Input Image 對象

此節(jié)有 238 人學(xué)習(xí)過     參與評論

Input Image 對象

Input Image 對象是 HTML5 中的新對象。

Input Image 對象表示 HTML <image> 元素。

訪問 Input Image 對象

您可以通過使用 getElementById() 來訪問 <image> 元素:

var x = document.getElementById("myImage");

提示:您也可以通過遍歷表單的 elements 集合來訪問 Input Image 對象。

創(chuàng)建 Input Image 對象

您可以通過使用 document.createElement() 方法來創(chuàng)建 <image> 元素:

var x = document.createElement("INPUT");
x.setAttribute("type", "image");

Input 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 屬性值。

標(biāo)準(zhǔn)屬性和事件

Input Image 對象支持標(biāo)準(zhǔn)屬性事件。

相關(guān)頁面

HTML 教程:HTML 表單

HTML 參考手冊:HTML <input> 標(biāo)簽

HTML 參考手冊:HTML <input> type 屬性

如對本文有疑問,請?zhí)峤坏浇涣髡搲瑥V大熱心網(wǎng)友會為你解答?。?點(diǎn)擊進(jìn)入論壇

發(fā)表評論 (238人查看,0條評論)
請自覺遵守互聯(lián)網(wǎng)相關(guān)的政策法規(guī),嚴(yán)禁發(fā)布色情、暴力、反動的言論。
昵稱:
最新評論
------分隔線----------------------------
JavaScript 教程目錄

其它欄目

· 建站教程
· 365學(xué)習(xí)

業(yè)務(wù)咨詢

· 技術(shù)支持
· 服務(wù)時間:9:00-18:00
365建站網(wǎng)二維碼

Powered by 365建站網(wǎng) RSS地圖 HTML地圖

copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號