작성일 : 11-10-17 09:57
|
[JQuery] JQuery 유효성검사 CheckBox 체크박스
|
|
|
글쓴이 :
Mr가망생
 조회 : 2,826
|
<input type="checkbox" name="agree" value="1" />
<script type="text/javascript">
<!--
function fn_validation(){
var chk = $("input[name='agree']").filter(function() {if (this.checked) return this;}).val();
if(chk != "1") {
alert("개인정보동의에 체크하세요.");
$("input[name='agree']").focus();
return false;
} else {
// 체크가 되었네요.
}
}
//-->
</script>
|
|