HTML DOM イプート・イメージ・オブジェクト
- 前のページ <input> hidden
- 次のページ <input> month
Input Image オブジェクト
Input Image オブジェクトは HTML5 で新しいオブジェクトです。
Input Image オブジェクトは HTML <image> 要素を表します。
Input Image オブジェクトにアクセス
getElementById() を使用して <image> 要素にアクセスできます:
var x = document.getElementById("myImage");
ヒント:フォームを巡回して、 elements セット Input Image オブジェクトにアクセスするために。
Input Image オブジェクトの作成
document.createElement() メソッドを使用して <image> 要素を作成できます:
var x = document.createElement("INPUT"); x.setAttribute("type", "image");
Input Image オブジェクト属性
属性 | 説明 |
---|---|
autocomplete | email フィールドの autocomplete 属性値を設定または返します。 |
alt | input image の alt 属性値を設定または返します。 |
autofocus | ページが読み込まれた後に自動的にフォーカスを取得するかどうかを設定または返します。 |
defaultValue | input image のデフォルト値を設定または返します。 |
disabled | input image が無効化されているかどうかを設定または返します。 |
form | input image を含むフォームへの参照を返します。 |
formAction | input image の formaction 属性値を設定または返します。 |
formEnctype | input image の formenctype 属性値を設定または返します。 |
formMethod | input image の formmethod 属性値を設定または返します。 |
formNoValidate | フォームを提出する際にフォームデータ(form-data)のバリデーションを行うかどうかを設定または返します。 |
formTarget | input image の formtarget 属性値を設定または返します。 |
height | input image の height 属性値を設定または返します。 |
name | input image の name 属性値を設定または返します。 |
src | input image の src 属性値を設定または返します。 |
type | input image フィールドのフォーム要素のタイプを返します。 |
value | input image の value 属性値を設定または返します。 |
width | input image の width 属性値を設定または返します。 |
- 前のページ <input> hidden
- 次のページ <input> month