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<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