Structs2 checkList 前台判断

<s:checkboxlist list="roleList" listKey="roleName"
										listValue="roleName"
										name="failurePolicy.troubleShootingPerson"></s:checkboxlist>


 var f = document.getElementsByName("failurePolicy.troubleShootingPerson");
          var xx=false;
          for(var i = 0; i < f.length; i++){
        	  if( f[i].checked){
        		  xx=true;
        		  }
          }
         if(xx==false){
        	 alert("请选择处理人角色");
        	 return;
         }
		$("#guizeForm").submit();

你可能感兴趣的:(checkboxlist)