<form id="form1" name="form1" method="post" action="#">

<input type="hidden" name="sort1" value="1" />

<input type="hidden" name="sort2" value="1" />

<input type="hidden" name="pn" value="1" />

1. 를 확인하셨습니까?

<label for="chart1">①예</label><input type="radio" name="chart" id="chart1" value="Y" />

<label for="chart2">②아니오</label><input type="radio" name="chart" id="chart2"  value="N" checked="checked" />

<Br />

2. 개인정보 제공 및 이용 

<label for="agree1">동의</label><input type="radio" name="agree" id="agree1" value="Y" />

<label for="agree2">동의안함</label><input type="radio" name="agree" id="agree2" value="N" checked="checked" />

<Br />

  <input type="image" src="../images/board/btn_save2.gif" alt="확인" class="no_border" id="check_box"/> 

  <a href="#"><img src="../images/board/btn_cencel2.gif" alt="취소" /></a>


  </form>


<script type="text/javascript">

<!--


$(function(){

$("input#check_box").click(function(){

if($("#chart1:checked").attr("value")=="Y"){

//return true;

}else{

alert("확인하여주십시오.");

$("#chart1:input").focus();

return false;

}


if($("#agree1:checked").attr("value")=="Y"){

//return true;

}else{

alert("이용동의 하지 않으셨습니다.");

$("#agree1:input").focus();

return false;

}


if($("#chart1:checked").attr("value")=="Y" && $("#agree1:checked").attr("value")=="Y"){

return true;

}

});

});


//-->

</script>

'progarm_old > [HTML-Jquery]' 카테고리의 다른 글

jquery를 쉽게 가져오기  (0) 2016.04.05
체크갯수확인 checkbox  (0) 2015.05.11
[jquery] select 셀렉트박스 모양꾸미기  (0) 2014.11.05
한글 숫자만 입력가능한 input  (0) 2014.10.20
[css] background-url  (0) 2014.10.16

+ Recent posts