JavaScript

[HTML_Objects] JS - <input type="radio"> 객체 ★ - radio타입 input태그 (= 인풋라디오태그 / 인풋레이디오태그) ※ 라디오 선택버튼

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

 

<input type="radio"> 객체 정의 - 라디오 인풋

 

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

 

 

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

 

[접근]

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

또는,

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

 

[생성]

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

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

 

 

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

 

Homzzang.com 최고: <input type="radio" id="hz">


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


<script>

function homzzang() {

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

  x.checked = true;

}

</script> 

 

결과보기 

 

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

 

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


<script>

function homzzang() {

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

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

  document.body.appendChild(x);

}

</script> 

 

결과보기

 

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

 

autofocus

페이지 로드 될 때 radio 버튼이 자동으로 focus 가져야하는지 여부 설정/반환.

 

checked

radio 버튼의 체크 상태 설정/반환.

 

defaultChecked

checked 속성의 기본값 반환.

 

defaultValue

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

 

disabled

radio 버튼의 비활성화 여부 설정/반환.

 

form

radio 버튼이 포함된 form에 대한 참조 반환.

 

name

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

 

required

양식 제출 전에 radio 체크해야하는지 여부 설정/반환.

 

type

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

 

value

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

 

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

 


분류 제목
DOM_Style JS - animationPlayState 속성 - 애니재생상태 (= 애니작동상태설정 = 움직임 재생/멈춤 …
DOM_Style JS - background 속성 ★ - (배경색/배경이미지) 설정/반환 (= background속성 / 백…
DOM_Style JS - backgroundAttachment 속성 ★ - 배경이미지고정 설정/반환
DOM_Style JS - backgroundColor 속성 ★ - 배경색 설정/반환. (= backgroundColor속성 …
DOM_Style JS - backgroundImage 속성 ★ - 배경이미지 설정/반환 (= backgroundImage속성…
DOM_Style JS - backgroundPosition 속성 - 배경이미지위치 설정/반환
DOM_Style JS - backgroundRepeat 속성 - 배경이미지반복 설정/반환
DOM_Style JS - backgroundClip 속성 - 배경 영역 (= backgroundClip속성 = 백그라운드클립…
DOM_Style JS - backgroundOrigin 속성 - 배경이미지 좌표시작점 설정/반환 (= 백그라운드오리진 속성)
DOM_Style JS - backgroundSize 속성 ★ - 배경이미지크기 설정/반환 (IE9 이상)
DOM_Style JS - backfaceVisibility 속성 - 3D요소 뒷면노출 설정/반환 (IE10 이상)
DOM_Style JS - border 속성 ★ - 테두리스타일 설정/반환 (= 보더속성 = border속성)
DOM_Style JS - borderBottom 속성 - 테두리하단 (= border-bottom속성 = 하단테두리 = 보더…
DOM_Style JS - borderBottomColor 속성 - 테두리하단색깔 (= 보더바텀컬러속성 = border-bot…
DOM_Style JS - borderBottomLeftRadius 속성 - 테두리하단왼쪽모서리둥글게 (= 테두리 하단좌측둥글…
57/89
목록
 홈  PC버전 로그인 일본어
그누앞단언어
그누뒷단언어
그외코딩언어
그누보드
제작의뢰
Q&A
커뮤니티 2
웹유틸
회원센터
홈짱닷컴 PC버전 로그인