CopyCode The Code is as follows: function resumeerror (){
Return true;
}
Window. onerror = resumeerror;
Function showdd (OBJ ){
VaR DDS = Document. getelementbyid (OBJ). getelementsbytagname ("DD ");
VaR Len = DDS. length;
If (DDS [0]. style. Display = "NONE "){
// This operation is an expanded menu. You need to determine whether this option exists in the cookie.
// 1. Yes, delete
// 2. None. do not perform the operation
Changeshowmenu (OBJ );
For (VAR I = 0; I <Len; I ++ ){
DDS [I]. style. Display = "";
}
} Else {
// This operation is a hidden menu. You need to determine whether this option exists in the cookie:
// 1. Yes. No operation is performed.
// 2. If no, add it to the end
Changehidemenu (OBJ );
For (VAR I = 0; I <Len; I ++ ){
DDS [I]. style. Display = "NONE ";
}
}
}
Function changeshowmenu (OBJ ){
VaR temp = getcookie ("openid ");
If (temp. indexof (OBJ )! = "-1 "){
Temp = temp. Replace (OBJ + ",","")
Addcookie ("openid", temp, 24 );
}
}
Function changehidemenu (OBJ ){
VaR temp = getcookie ("openid ");
If (temp. indexof (OBJ) = "-1 "){
Addcookie ("openid", temp + OBJ + ",", 24 );
}
}
Function getcookie (sname) {// get Cookie
VaR acookie = Document. Cookie. Split (";");
For (var j = 0; j <acookie. length; j ++ ){
VaR acrumb = acookie [J]. Split ("= ");
If (sname = acrumb [0])
Return acrumb [1];
}
Return NULL;
}
Function addcookie (objname, objvalue, objhours) {// Add cookie
VaR STR = objname + "=" + objvalue;
If (objhours> 0) {// when the value is 0, no expiration time is set. When the browser is disabled, the cookie disappears automatically.
VaR date = new date ();
VaR MS = objhours x 3600*1000;
Date. settime (date. gettime () + MS );
STR + = "; expires =" + date. togmtstring ();
}
Document. Cookie = STR;
}
// Based on a string separated by commas (,), which of the initialization menus need to be hidden?
Function initmenu (OBJ ){
VaR arrmenu = obj. Split (",");
For (VAR I = 0; I <arrmenu. length; I ++ ){
VaR DDS = Document. getelementbyid (arrmenu [I]). getelementsbytagname ("DD ");
For (var j = 0; j <DDS. length; j ++ ){
DDS [J]. style. Display = "NONE ";
}
}
}
Function $ (OBJ ){
Return document. getelementbyid (OBJ );
}
Function delit (){
VaR cbxbool = 0;
For (VAR I = 0; I <cbxarray. length; I ++ ){
VaR OBJ = $ (cbxarray [I]);
If (obj. Checked = true ){
Cbxbool = 1;
Break;
}
}
If (cbxbool = 1 ){
VaR result = confirm ("the operation cannot be recovered. Are you sure you want to perform the current operation? ");
If (result ){
Return true;
}
} Else {
Alert ("You have not selected ");
Return false;
}
Return false;
}
Window. onload = function (){
VaR Lendl = Document. getelementbyid ("globalleft"). getelementsbytagname ("DL"). length;
If (getcookie ("openid") = NULL ){
Addcookie ("openid", "dl_c, dl_d, dl_e, dl_f, dl_g, dl_h, dl_ I, dl_j,", 24 );
}
Initmenu (getcookie ("openid "));
VaR otable = Document. getelementbyid ("table ");
VaR TRS = otable. getelementsbytagname ("TR ");
For (VAR I = 0; I <TRS. length; I ++ ){
TRS [I]. onmouseover = function (){
This. style. backgroundcolor = "# f7f7f7 ";
}
TRS [I]. onmouseout = function (){
This. style. backgroundcolor = "# ffffff ";
}
}
}