For orders, we must be no stranger to it, under the introduction of the next use of JS to achieve the order, interested friends can refer to the next
The code is as follows: <%@ page language= "java" contenttype= "text/html; Charset=utf-8 " pageencoding=" Utf-8 "%> <% string path = Request.getcontextpath (); string BasePath = Request.getscheme () + "://" + request.getservername () + ":" + request.getserverport () + path + "/"; %> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" > <html > <head> <title> Query system </title> <link rel= "stylesheet" type= "Text/css" href= "Http://www.jeasyui.com/easyui/themes/default/easyui.css" > <link rel= "stylesheet" type= "Text/css" " href=" http://www.jeasyui.com/easyui/themes/icon.css "> <link rel=" stylesheet "type=" Text/css " href= "Http://www.jeasyui.com/easyui/demo/demo.css" > <script type= "text/javascript" src= " Http://code.jquery.com/jquery-1.6.min.js "></script> <script type=" Text/javascript " Src= "Http://www.jeasyui.com/easyui/jquery.easyui.min.js" ></script> <script type= "text/ JavaScript " src=" Http://www.jeasyui.com/easyui/datagrid-detailview.js ></script> <script src= "<%=basepath%>js/jquery.confirm.js" ></script> <link rel= "stylesheet" href= "<%=" BasePath%>css/jquery.confirm.css "> <style type=" text/css "> form { margin:0; padding:0; } dv-table TD { border:0; } dv-table input { Borde r:1px solid #ccc; } </style> </head> <body> <table id= "DG" Title= " Booking decoration Management "class=" Easyui-datagrid " style=" width:1200px; height:590px "url=" <%=basepath%>findsubsbypage.action " toolbar=" #toolbar "pagination=" true "rownumbers = "true" fitcolumns= "true" singleselect= "true" > <thead> <tr> <th field= "Tel "Width=" > Contact Way </th> <th field= "name" width= "> Contact </th> <th field=" nametype "width=" > Decoration name </th > <th field= "ordertime" width= "> Reservation time </th> <th field=" content "width=" "> Notes </th> <th field= "Sex" width= "> Sex </th> <th field=" nowtime "width=" > Submission Time < /th> <!--<th field= "status" Width= "ten" > Status </th>--> </tr> </ thead> </table> <div id= "toolbar" > <div id= "toolbar" > <a href= " Javascript:void (0) "class=" Easyui-linkbutton "iconcls=" Icon-remove "plain=" true "onclick=" Destroyuser () "> Delete order </a> <a href= "javascript:void (0)" class= "Easyui-linkbutton" id= "Unorder" > Not sold orders </a> <a href= "javascript:void (0)" class= "Easyui-linkbutton" id= "Order" > Sold orders </a> <a href= "javascript: void (0) " class=" Easyui-linkbutton "id=" OK "> Deal </a> </div> ;/div> <table> <tr> <td colspan= "1" ></td> </tr> </ table> <script type= "Text/javascript" > $ (function () { $ ("#unorder"). Click (function () { var url = ". /findsubsbypage.action "; $.post (URL, { status:0 }, Function () { $ (' #dg '). DataGrid (' reload '); nbsp ; }); $ ("#order"). Click (function () { var url = ". /findsubsbypage.action "; $.post (URL, { status:1 }, Function () { $ (' #dg '). DataGrid (' reload '); nbsp ; }); $ ("#ok"). Click (function () { var url = ". /updatesub.action "; var row = $ (' #dg '). DataGrid (' getselected '); var elem = $ (this). Closest ('. Item '); if (row!= null) { $.confirm ({ ' title ': ' Operation confirmation prompt ', ' message ': ' Are you sure you want to do this transaction? ', ' buttons ': { ' Yes ': { ' class ': ' Blue ', ' action ': function () { elem.slideup (); $.post (URL, { id:row. Id }, Function () { $ (' #dg '). DataGrid (' Reload '); }); } ' No ':}, ' class ': ' Gray ', ' action ': function () { } } } }); } else { alert ("You have not selected any information!"); } }); setinterval (function () { $ (' #dg '). DataGrid (' Reload '); }, 60000); }); function Destroyuser () { var row = $ (' #dg '). DataGrid (' getselected '); if (row) { $.messager.confirm (' Action prompt ', ' Are you sure you want to delete this order? ', function (r) { if (r) { $.post ('. /deletesub.action ', { id:row.id }, Function (Result) { if (result.success) { $ (' #dg '). DataGrid (' Reload '); Reload the user data } else { $.messager.show ({//Show error message title: ' Error ', msg:re sult.errormsg }); } }, ' json '); } }); } </script> < Script language= "JavaScript" > function Myrefresh () { window. Location.reload (); } settimeout (' Myrefresh () ', 3000000); Specify 5 Seconds to refresh once </script> <style type= "text/css" > #fm { margin:0; padding:10px 30px; } ftitle { font-size:14px; font-weight:bold; padding:5px 0; Margin-bo ttom:10px; border-bottom:1px solid #ccc; } fitem { margin-bottom:5px; -} &NB SP;. Fitem label { display:inline-block; width:80px; } </style> </body> </html>