正文

客户端实现级联全选2006-04-01 09:30:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/Csharpsky/11696.html

分享到:

<script language="JavaScript"><!--function display( dis, hid ){ document.getElementById(hid).style.display="none"; document.getElementById(dis).style.display="";}function checkintst(str,check){    if(str == null || str == '') return;    var aIndex = str.split(',');    for(i=0;i < aIndex.length;i++)    {        var node = document.getElementById('interest'+aIndex[i]);        node.checked = check;    }}var types = [[true,'1,2,3,4,5,6,7'], [true,'8,9,10,11,12'], [true,'19,20,21,22,37'], [true,'13,14,15,16,17,18'], [true,'23,24,25,26,27'], [true,'28,29,30,31'], [true,'32,33,34,35,36']];function checktype( index ){ checkintst( types[index][1],types[index][0] ); types[index][0] = types[index][0]?false:true;}var allchecked = false;function checkall(){ allchecked = allchecked?false:true; for(i=1;i<=37;i++){         var node = document.getElementById('interest'+i);         node.checked = allchecked;    }    var listnode = document.getElementsByName("checkbox");    for( i=0; i < listnode.length; i++ ){     listnode[i].checked = allchecked;    }    for( i=0; i < 7; i++ ){     types[i][0] = allchecked?false:true;    }}function doSubmit(){ var checklist = document.getElementsByName("interest"); for( i = 0; i < checklist.length; i++ ){  if ( checklist[i].checked ){   return true;  } } document.getElementById("divMsg").style.display = ""; return false;}///////////   var gHost = document.domain; // g1a1.mail.126.comvar gSid = "ABdQusFyYETAsgdm";var gUser = "heilong05";var gHuodong = "00000000";var sMainUrl = "/cgi/ldapapp?funcid=main&sid="+gSid;var sPostUrl; function setUrls(){ if(document.domain == "163.com"){  sPostUrl = "http://uinfo.mail.163.com/servlet/userinfo/update3"; }else if(document.domain == "126.com"){  sPostUrl = "http://uinfo.mail.126.com/servlet/userinfo/update3";  } var frm = document.getElementById("surveyForm"); var picurl = document.getElementById("picurl"); frm.action = sPostUrl; frm.domain.value = document.domain; // 126.com frm.username.value = gUser; frm.host.value = gHost; frm.sid.value = gSid; frm.huodong.value = gHuodong; picurl.onclick=function(){  window.location = sMainUrl;  return false; }}function isSet(){ var gHuodong = document.userform.huodong_option.value; if(gHuodong.length != 0 && gHuodong.substring(7,8)=="1"){  window.location = sMainUrl; }}/////////////--></script>

阅读(3216) | 评论(0)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

暂无评论
您需要登录后才能评论,请 登录 或者 注册