//联动菜单设置cookie保持刷新值
       window.onunload = function(){
      var epd=new Date();
      epd.setDate(epd.getDate()+7);
        document.cookie="pg="+document.getElementById("group").selectedIndex+";expires="+epd.toGMTString();
     }
      window.onload = function(){
      var i=0;
         var gck = document.cookie.split("; ");
    if(gck[0].split("=")[0]=="pg"){
       i = parseInt(gck[i].split("=")[1]);
    }
    document.getElementById("group").selectedIndex = i;
  
    }
因为是三级联动菜单,但如果批量写入,提交页面后返回,能保持三个下拉框select的值为原先选择的值。不知道怎么弄?
   document.cookie="pg="+document.getElementById("group").selectedIndex+";expires="+epd.toGMTString();
      document.cookie="pg="+document.getElementById("dept").selectedIndex+";expires="+epd.toGMTString();
     document.cookie="pg="+document.getElementById("user").selectedIndex+";expires="+epd.toGMTString();