$(document).ready(function(){
  
  $("input[name*='sUserResult']").click(function(){
   var st = $(this).val();
    alert(st); //<--선택한값체크
    
    var ttt= $("input[name*='sUserResult']:radio:checked");
  
    alert(ttt.length); //nationality의 checked갯수 체크
    
    if(ttt.length != 2){
     alert("누락된 설문이 존재합니다.");
    }
  });
  
  
  });


input name="sUserResult[1]" type="radio" value="1">1
input name="sUserResult[1]" type="radio" value="2">2
input name="sUserResult[1]" type="radio" value="3">3
input name="sUserResult[1]" type="radio" value="4">4





input name="sUserResult[2]" type="radio" value="1">1
input name="sUserResult[2]" type="radio" value="2">2
input name="sUserResult[2]" type="radio" value="3">3
input name="sUserResult[2]" type="radio" value="4">4

'IT > Script' 카테고리의 다른 글

xmlhttprequest_header  (0) 2020.01.29
[script] 천단위 , 밑 기타등등  (0) 2020.01.20
자동실행 onload & ready()  (1) 2012.09.07

+ Recent posts