// name을 같은 값으로 한 범위 안에서 단일 선택가능
<form method="get" action="example">
<input type="radio" value="1" name="score"> 1
<input type="radio" value="2" name="score"> 2
<input type="radio" value="3" name="score" checked> 3 // checked가 기본값
<input type="radio" value="4" name="score"> 4
<input type="radio" value="5" name="score"> 5
</form>
// jquery로 선택된 radio 값 가져오기
$('input[name="score"]:checked').val()
'HTML & CSS' 카테고리의 다른 글
뷰포트 viewport (0) | 2022.04.29 |
---|---|
캐싱(caching) (0) | 2022.02.23 |
getBoundingClientRect (0) | 2022.02.09 |
min-content/max-content/fit-content와 auto (0) | 2022.02.08 |
반응형 웹을 위한 단위 정리 vh, vw, calc, em, rem (0) | 2022.02.08 |