Knowledge front end - the control input of the buttons available and unavailable

Recently in the development of the project, although her written back end, however, in the development of the core, it is still the front-end knowledge will be used, and many more front-end piece of their own due to the long time no see, so almost already forgotten about it, and now can only remember a little bit recording, to be able to continue to enrich themselves.

1  // Select a record in mulline 
2  function selectOneRecord () {
 . 3      var AppendixGrid.getSelNo I = () - 1 ;
 . 4      fm.RiderType.value AppendixGrid.getRowColData = (I,. 11); // attachment type 
. 5      FM. = AppendixGrid.getRowColData RiderTypeDes.value (I,. 1); // attachment type name 
. 6      fm.ImportPath.value AppendixGrid.getRowColData = (I, 2); // file name 
. 7      fm.Remarks.value AppendixGrid.getRowColData = (I , 3); // NOTE 
. 8      IF ( "02" == AppendixGrid.getRowColData (I, 12 is )) {
 . 9          // the button is set to the necessary gray
10 document.getElementById ( "watchLocalBtn") setAttribute ( "disabled", true);. // Browse Local 
11 document.getElementById ( "btnOpenUpload") setAttribute ( "disabled", true);. // upload files 
12 document.getElementById ( "saveRemarksBtn") setAttribute ( " disabled", true);. // save Note 
13 document.getElementById ( "cancelBtn") setAttribute ( "disabled", true);. // void 
14  
15      } the else {
 16          // if selection is effective attachment of these buttons should not be grayed out 
17 document.getElementById ( "watchLocalBtn") disabled = false;. // Browse local 
18 document.getElementById ( "btnOpenUpload") disabled = false ;; // upload files. 
19 document.getElementById ( "saveRemarksBtn "). disabled = false ;; // save Remarks 
20 document.getElementById ( "cancelBtn "). disabled = false ;; // void 
21      }
 22 
23 
24 }

Which is more marked in red key code.

Guess you like

Origin www.cnblogs.com/dongyaotou/p/11874133.html