Jquery-dialog Button Set gray non-clickable action

Source: Internet
Author: User

Var editupdate=function () {var appid=process_appid;$ ("#editupdate"). Dialog (' option ', ' appId ', appId); Var dlg = document.getelementbyid ("Editupdate");var elements =  Dlg.getelementsbytagname ("INPUT") for ( i = 0 ; i < elements.length ;  i++ ) {Var item = elements.item (i); if (item.name== "Finishtime") {       var date= new date (Applyall[appid][item.name]);             //date Formatting       var days=  Date.getdate ();  //returns the day of the one month   (1 ~ 31) from the  Date  object.                        var months=date.getmonth () +1;//returns the month   (0&NBSP;~&NBSP;11) from the  Date  object.             &nbSp;         var years=date.getfullyear ();//From  Date  The object returns the year as a four-digit number.                        var hours=date.gethours ();//returns  Date  object's Hour   (0 ~ 23).                        var minutes=date.getminutes ();//Return  Date  object's Minutes   (0 ~ 59).                        var seconds=date.getseconds ();//Returns the number of seconds for the  Date  object   (0 ~ 59).       if (days<10) {        days= "0" + Days;      }      if (hours<10) {          hours= "0" +hours;      }      if (MINUTES&LT;10) {        minutes= "0" +MINUTES;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;}       if (seconds<10) {        seconds= "0" +seconds;      }        if (months< {        months= "0" +MONTHS;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;}       item.value=years+ "-" +months+ "-" +days+ " " +hours+ ":" +minutes+ ":" + Seconds;      if (item.value== "Nan-nan-nan nan:nan:nan") {       item.value= "Nullvalue";      }       }else{      item.value = applyAll[appId][item.name];          }                }var elements = dlg.getelementsbytagname ("select"); for ( i = 0 ;  i < elements.length ; i++ ) {Var item = elements.item (i); item.value = applyall[appid][item.name];//button to determine if (item.value== "Finish") is disabled {               $ ("#editupdate"). Parent (). Find ("button"). each ( function ()  {                              if ( $ (this). Text ()  ==  ' modify '  )  {                                  $ (This). attr (' disabled ', true);                                }                               });} else{                             $ ("#editupdate"). Parent (). Find ("button"). each (function ()  {                              if ( $ (this). Text ()  ==  ' modify '  )  {                                 $ (This). attr (' disabled ',  false);                                 }                              }) ;}} $ ("#editupdate"). Dialog ("Open");};


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/2D/wKiom1WTq8exCcmnAAEeYCvpnaY693.jpg "title=" Xiugai.jpg "alt=" Wkiom1wtq8exccmnaaeeycvpnay693.jpg "/>



Jquery-dialog Button Set gray non-clickable action

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.