HTML DOM 입력 이미지 개체
입력 이미지 개체
유형 = "이미지"HTML 요소 <입력> 요소를 사용하여 입력 이미지 개체 표현입니다.
입력 이미지 개체 액세스
당신은 <입력> 요소는 속성 유형 = "이미지"를 사용하여 액세스하는 기능에서 getElementById ()를 사용할 수 있습니다 :
var x = document.getElementById("myImage");
팁 : 형성 할 수있는 요소 객체의 입력 날짜 시간 컬렉션에 액세스 할 수 있습니다.
입력 이미지 개체 만들기
당신은 <입력> 요소의 속성을 유형 = "이미지"를 사용하여 만들 수 document.createElement () 메서드를 사용할 수 있습니다 :
var x = document.createElement("INPUT");
x.setAttribute("type", "image");
x.setAttribute("type", "image");
입력 이미지 개체 속성
= HTML5의 새로운 속성입니다.
Property | 描述 |
---|---|
alt | 设置或返回 input image 的 alt 属性值 |
autofocus | 设置或返回 input image 是否在页面加载后自动获取焦点 |
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 属性值 |
표준 속성 및 이벤트
입력 날짜 시간 개체는 표준 지원 속성 및 이벤트를 .
관련 기사
HTML 자습서 : HTML 양식
HTML 참조 설명서 : HTML <의 INPUT> 태그
HTML 참조 설명서 : type 속성의 HTML <의 INPUT>