- 전체
- HTML
- Web Design (웹디자인)
- XE 응용 개발
- wordpress plugin dev
- Javascript & JavaScript Application
- MEAN Stack : full stack javascript
- angular js & ionic framework
- bootstrap
- WebGL, Three.js and Babylon.js
- restful api design
- mobile web
- node.js 응용
- Cloud Service 응용
- 웹 어셈블리 개발 [WASM, WebAssembly]
- 마이크로서비스, MSA (microservice architecture)
- WebGL / WebGPU
- next.js 개발
- micro frontend (마이크로프론트앤드)
- 전자상거래/쇼핑몰
- 서버 클라우드 (aws, azure, google)
JQuery JQuery로 radio 버튼의 값 가져오기 : How to get the value of selected radio button in a group using jQuery
2019.01.10 17:41
JQuery로 radio 버튼의 값 가져오기
How to get the value of selected radio button in a group using jQuery
Answer: Use the jQuery :checked selector
You can use the jQuery :checked selector in combination with the val() method to find the value of certain radio button inside a group. Here's an example:
Example
Try this code »-
-
<html lang="en">
-
<head> -
<meta charset="UTF-8">
-
<title>jQuery Get Selected Radio Button Value</title>
-
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
-
<script type="text/javascript">
-
$(document).ready(function(){ -
$("input[type='button']").click(function(){ -
var radioValue = $("input[name='gender']:checked").val(); -
if(radioValue){ -
alert("Your are a - " + radioValue); -
} -
}); -
-
}); -
</script> -
</head> -
<body> -
<h4>Please select your gender.</h4> -
<p> -
<label><input type="radio" name="gender" value="male">Male</label> -
<label><input type="radio" name="gender" value="female">Female</label> -
</p> -
<p><input type="button" value="Get Value"></p> -
</body> -
</html>
[출처] https://www.tutorialrepublic.com/faq/how-to-get-the-value-of-selected-radio-button-using-jquery.php
본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
댓글 0
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|
| 7 | [전자상거래/쇼핑몰 개발] [카페24쇼핑몰] 품목생성형과 상품연동형 옵션의 차이점이 궁금합니다. | 졸리운_곰 | 2024.07.30 | 385 |
| 6 |
[전자상거래/쇼핑몰 개발] cafe24 MySQL db 외부접속 방법
| 졸리운_곰 | 2024.07.23 | 566 |
| 5 |
[전자상거래/쇼핑몰 개발] 초보 셀러를 위한 쇼피파이(Shopify) 제작 가이드
| 졸리운_곰 | 2024.07.03 | 585 |
| 4 |
[전자상거래/쇼핑몰 개발] [카페24쇼핑몰] [API] Cafe24 - API 호출 예시
| 졸리운_곰 | 2024.06.25 | 413 |
| 3 | [전자상거래/쇼핑몰 개발] [카페24쇼핑몰] 카페24 무료 쇼핑몰 가입 | 졸리운_곰 | 2024.05.20 | 543 |
| 2 | [전자상거래/쇼핑몰 개발] [카페24쇼핑몰] 카페24 쇼핑몰 상세화면 설정 | 졸리운_곰 | 2024.05.20 | 244 |
| 1 |
[전자상거래/쇼핑몰 개발] [카페24쇼핑몰] 상품상세 검색
| 졸리운_곰 | 2024.05.17 | 611 |

