Because of the reasons for the graduation design, in the initial design of the system without considering the correctness of the function, so many of the functions are not added to verify and confirm the operation, to the operation of some bad feeling (may be wrong Click, the data do not delete, or increase), so found some information on the Internet, the following are two ways:
1 //Announcement Review2 function Checknotice ()3 {4var row = $ (' #mydg '). DataGrid (' getselected '); 5 if(row) {6 if(Row. tstatus== "Not approved"){7 8$.messager.confirm (' Continue ', ' OK to perform the issued operation? '), 9 function (r) {Ten if(r) { One $.ajax ({ AURL: ' Noticeaction_checknotice.action ', -Method: "Post", -DataType: "HTML", the data:{ - Noticeid:row. Tnoticeid, - Ntitle:row. Ttitle, - Ncontent:row. Tcontent, + Nadminid:row. Tadminid, - Nadddate:row. Tadddate, + Nstatus:row. Tstatus, A Nvisitnum:row. Tvisitnum at }, - success:function (data) { - if(data) - { -SHOWMYMSG (' Message management ', ' messaging success! ')); -$ (' #mydg '). DataGrid (' Reload '); in - } to Else{ +SHOWMYMSG (' Message management ', ' Messaging failed! ')); - } the * } $ });Panax Notoginseng - } the }); +}Else{ ASHOWMYMSG (' Message Management ', ' Bulletin approved! ')); the } +}Else{ -SHOWMYMSG (' Message management ', ' Please select a data audit! ')); $ } $}
May not write very well, because I am also small white.
To believe: programming is a
Pre: 90% (hand force) +10% (mental)------------------> Self-feeling. Ha ha
JQuery Easyui Pop-Up confirmation dialog box (Confirm action ...)