JavaScript

[HTML_Objects] JS - <input type="submit"> 객체 - submit타입 input태그 (= 인풋서브미트태그/인풋서브밋태그) ※ 전송/제출 버튼

목차
  1. <input type="submit"> 객체 정의 - 전송 인풋
  2. <input type="submit"> 객체 구문
  3. <input type="submit"> 객체 예제 - 접근
  4. <input type="submit"> 객체 예제 - 생성
  5. <input type="submit"> 객체 속성

 

<input type="submit"> 객체 정의 - 전송 인풋

 

HTML <input type="submit"> 태그(요소) 의미.

 

 

<input type="submit"> 객체 구문

 

[접근]

var x = document.getElementById("요소ID");

또는,

var x = document.getElementById("폼요소ID").elements;

 

[생성]

var x = document.createElement("INPUT");

x.setAttribute("type", "submit");


 

<input type="submit"> 객체 예제 - 접근 

 

<input type="submit" id="hz" value="확인">


<button onclick="homzzang()">클릭</button>


<p id="demo"></p>


<script>

function homzzang() {

  var x = document.getElementById("hz").value;

  document.getElementById("demo").innerHTML = x;

}

</script> 

 

결과보기 

 

<input type="submit"> 객체 예제 - 생성

 

<button onclick="homzzang()">클릭</button>


<script>

function homzzang() {

  var x = document.createElement("INPUT");

  x.setAttribute("type", "submit");

  document.body.appendChild(x);

}

</script> 

 

결과보기

 

<input type="submit"> 객체 속성

 

autofocus

페이지 로드 시 sumbit 버튼이 자동으로 focus 가질지 여부 설정/반환.

 

defaultValue

sumbit 버튼의 기본값 설정/반환.

 

disabled

sumbit 버튼이 사용 불가능한지 여부 설정/반환.

 

form

sumbit 버튼이 포함 된 양식에 대한 참조 반환.

 

formAction

sumbit 버튼의 formaction 속성값 설정/반환.

 

formEnctype

sumbit 버튼의 formenctype 속성값 설정/반환.

 

formMethod

sumbit 버튼의 formmethod 속성값 설정/반환.

 

formNoValidate

sumbit 버튼 눌렀을 때 form 데이터의 유효성 검사 여부 설정/반환.

 

formTarget

sumbit 버튼의 formtarget 속성값 설정/반환.

 

name

sumbit 버튼의 name 속성값 설정/반환.

 

type

sumbit 버튼의 form 요소 유형 반환.

 

value

sumbit 버튼의 value 속성값 설정/반환. 

 

※ <input type="submit"> 객체는 표준 속성/메서드/이벤트 지원. 


분류 제목
DOM_Style JS - borderBottomRightRadius 속성 - 테두리하단오른쪽모서리둥글게 설정/반환 (= 테두…
DOM_Style JS - borderBottomStyle 속성 - 테두리하단스타일
DOM_Style JS - borderBottomWidth 속성 - 테두리하단두께 (= 하단테두리두께 = 보더바텀위드스 = b…
DOM_Style JS - borderCollapse 속성 - 테두리겹침설정 (= 테두리중첩설정 = 테두리이중방지 = 보더컬랩…
DOM_Style JS - borderColor 속성 - 테두리색깔 설정/반환 (= borderColor속성 = 보더컬러 속성…
DOM_Style JS - borderImage 속성 - 테두리이미지 설정/반환 (= borderImage속성 = 보더이미지속…
DOM_Style JS - borderImageOutset -
DOM_Style JS - borderImageRepeat -
DOM_Style JS - borderImageSlice -
DOM_Style JS - borderImageSource -
DOM_Style JS - borderImageWidth -
DOM_Style JS - borderLeft -
DOM_Style JS - borderLeftColor -
DOM_Style JS - borderLeftStyle -
DOM_Style JS - borderLeftWidth -
58/89
목록
 홈  PC버전 로그인 일본어
그누앞단언어
그누뒷단언어
그외코딩언어
그누보드
제작의뢰
Q&A
커뮤니티 2
웹유틸
회원센터
홈짱닷컴 PC버전 로그인