HTML DOM 입력 제출 유형 속성은 type="submit"인 입력 요소와 연결됩니다. 항상 입력 제출 요소에 대해 제출을 반환합니다.
구문
다음은 제출 유형 속성의 구문입니다 -
submitObject.type
예시
제출 유형 속성의 예를 살펴보겠습니다 -
<!DOCTYPE html>
<html>
<body>
<h1>Input range type Property</h1>
<form>
VOLUME <input type="range" id="RANGE1" name="VOL">
</form>
<p>Get the above input element type by clicking the below button</p>
<button type="button" onclick="rangeType()">GET Type</button>
<p id="Sample"></p>
<script>
function rangeType() {
var P=document.getElementById("RANGE1").type;
document.getElementById("Sample").innerHTML = "The type for the input field is: "+P ;
}
</script>
</body>
</html> 출력
이것은 다음과 같은 출력을 생성합니다 -

"유형 가져오기" 버튼 클릭 시 -
