/** * Set Button button's available or read-only control Settings button display and hide * @param btn The name of a single button or an array holding multiple button names * @param status fixed value: TRUE or False * @param status1 fixed Value: True (Display control) or False (hide control) or no value (default Display control) * @returns no return value * Use Method 1: * Set button Name= "Btnquery" and Name= "Btncls" read-only, set button Name= " Btnquery "and Name=" BTNCLS "for display * var arrbtn = new Array (' btn ', ' btn2 '); * Btnstatus (Arrbtn,false); * * Use Method 2: * Set button Name= "Btnquery" available, set button Name= "Btnquery" for Hidden * btnstatus (' btnquery ', true,false); */function Btnstatus (BTN,STATUS,STATUS1) {if (typeof status1=== ' undefined ' | | STATUS1) {status1= ';//Display control}else{status1= ' none ';//Hide Control}//Determine if the array if (typeof btn = = ' object ' && typeof Btn.sort = = ' function ' && typeof btn.length = = ' number ') {for (Var i=0;i<btn.length;i++) {$ (' a[name= ' ' +btn[i]+ ' "] ' ) [0].disabled=!status;$ (' A[name= "' +btn[i]+ '"] ') [0].style.display=status1; }}else{$ (' a[name= ' ' +btn+ ' "] ') [0].disabled=!status; $ (' a[name= ' ' +btn+ ' "] ') [0].style.display=status1; } }
The control of the frame is hidden