5b84ac87a55fa7766466f4bf88b6b5ca9dd2e742.svn-base 710 B

123456789101112131415161718192021222324252627282930313233
  1. function showRole(data){
  2. var dom = $("#roleSel");
  3. var ul = $("<ul></ul>");
  4. for(var i=0;i<data.length;i++){
  5. var li = $("<li><input type='radio' value="+data[i]["ROLE_ID"]+" roleName="+data[i]["ROLE_NAME"]+" id="+data[i]["value"]+"_"+(i+1)+" name='role'><label for="+data[i]["value"]+"_"+(i+1)+">"+data[i]["ROLE_NAME"]+"</label></li>");
  6. ul.append(li);
  7. }
  8. ul.find("li").eq(0).find("input").attr("checked","checked");
  9. dom.append(ul);
  10. }
  11. function selRole(diag){
  12. var intVal = $("input:radio[name=role]").filter("[checked]").val();
  13. return intVal;
  14. }
  15. function selRoleName(diag){
  16. var intVal = $("input:radio[name=role]").filter("[checked]").attr("roleName");
  17. return intVal;
  18. }