자스로
라디오버튼 유효화를 체크할때 은근 소스가 길죠 항목이 많아도 귀찮구요
<script>
function checkradio(f){
for(i=1;i <51;i++){
if($.trim($(':radio[name="chk'+ i +'"]:checked').val()) ==""){
alert('모두 체크해주세요');
return false;}
}
f.action = '실행폼.php';
}
</script>
function checkradio(f){
for(i=1;i <51;i++){
if($.trim($(':radio[name="chk'+ i +'"]:checked').val()) ==""){
alert('모두 체크해주세요');
return false;}
}
f.action = '실행폼.php';
}
</script>
제이쿼리 셀렉트 문으로 간단하게 모든 라디오폼을 체크합니다. 트림으로 공백 지워주구요
라디오버튼의 갯수만큼 반복문 숫자만 변경하면 됩니다.
아래에 name=" 이부분에 지정하신 라디오버튼 이름바꿔주시구요
게시판 목록
팁게시판
디자인과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5152 |
senseme
|
12년 전 | 4176 | |
| 5151 |
senseme
|
12년 전 | 3746 | |
| 5150 |
프로프리랜서
|
12년 전 | 3146 | |
| 5149 |
프로프리랜서
|
12년 전 | 3977 | |
| 5148 |
프로프리랜서
|
12년 전 | 4359 | |
| 5147 |
프로프리랜서
|
12년 전 | 1589 | |
| 5146 |
senseme
|
12년 전 | 2719 | |
| 5145 |
senseme
|
12년 전 | 2725 | |
| 5144 |
senseme
|
12년 전 | 1262 | |
| 5143 | 12년 전 | 1301 | ||
| 5142 | 12년 전 | 8430 | ||
| 5141 |
senseme
|
12년 전 | 1519 | |
| 5140 |
senseme
|
12년 전 | 3753 | |
| 5139 |
senseme
|
12년 전 | 6336 | |
| 5138 |
senseme
|
12년 전 | 1557 | |
| 5137 | 12년 전 | 1156 | ||
| 5136 |
senseme
|
12년 전 | 1331 | |
| 5135 |
senseme
|
12년 전 | 3311 | |
| 5134 |
senseme
|
12년 전 | 1085 | |
| 5133 |
senseme
|
12년 전 | 1833 | |
| 5132 |
senseme
|
12년 전 | 1267 | |
| 5131 |
senseme
|
12년 전 | 920 | |
| 5130 | 12년 전 | 1410 | ||
| 5129 | 12년 전 | 2125 | ||
| 5128 |
senseme
|
12년 전 | 1396 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기