Função de implementação: implemente a tabela T arrastando e salve o nível alterado devido ao arrasto.
Código JSP
<div id = "mainContainer"> <div> <div id = "b_Center"> <div id = "inicia-detail-table"> <div> <h2 style = "margin-botom: 0px; margin-top: 0px; id = "addlg" type = "button"> <img src = "/center/imagens/btn_add.png"> adicione menu </button> </div> <br> <br> <tabela celularpacing = "0" idem): the "theattable" style = "word-wrap: break-word; word-break: breakll; tabela; <th style = "text-align: centro; largura: 10%;"> número </th> <th align = "center" style = "text-align: Center; largura: 17%"> nome do menu </th> <!-<th align = "center" style = "text-align:" center: menu: "> <th <th align =" center "style =" text-align: "> menu:"> <th <th alen = "style" style = "text-align:"> menu: "> <th <th =" center "style =" " style = "Text-align: Center"> Menu do segundo nível </th>-> <th align = "center" style = "text-align: centro; largura: 18%"> Menu Nome em inglês exibido </th> <th align = "center" style = "text-align: centro; largura: 20%"> operação </th> </tr> </thead> <tbody id = "list" style = "text-align: center;"> <% se (menulist! JsonObject json = menulist.getjsonObject (i); Menu menu = (menu) jsonObject.tobean (json.getjsonObject ("menu"), menu.class); %> <tr id id = "<%= menu.getLevel ()%>"> <td id = "<%= menu.getMenuid ()%>"> <%= menu.getLevel ()%> </td> <td> <dd> <%= menu.getmenuname ()%</div> </td> <ti <div> <%= menu.getenMenuname () == null? "": menu.getenMenuname ()%> </div> </td> <!-<td> <div> <%// if (menu.gethassecond () == 1) {%> Menu do primeiro nível <//}%> <td> <div> <%// if (json.getString ("ischild"). igual ("1")) {%> <a href = "javascript: void (0)" rel = "não OnClick = "getChildMenu ('<%// menu.getMenuid ()%>')"> view </a> <%//} else {%> nenhum <%//}%> </div> </td> -> <td> <div) <) <tEtMenutype () == 0) {> 1) {%> Tipo de texto <%} else {%> Link Type <%}%> </div> </td> <td> <%se (menu.getState () == 0) {%> <butt type = "Button" OnClick = "ChangemenUtate ('<%= menu.getMunam ()%>', <Click) type = "Button" style = "Background: #eeaea; cor: #d0d0d0;"> hide </button> <%} else {%> <button type = "button" style = "background: #eeaea; color: #d0d0d0;"> mostre </botão> <butão = "" "onClick =" ChangemenSustate (" %> ', <%= MENU.GETMENUID ()%>, 0) "> ocultar </button> <%}%> </td> <td> <%se (menu.getMenutype ()! = 0) {%> <div> Nofollow "style =" cor: vermelho; largura: 30px; display: block inline; " id = "<%= menu.getMenuid ()%>"> </a> </div> <%}%> <%se (menu.getMenutype ()! = 0) {%> <div style = "float: direita; margin-right: 10px;"> <a href = "javascript: nArg (0)" style = "cor: vermelho; largura: 30px; display: bloqueio inline;" id = "<%= menu.getMenuid ()%>"> </a> </div> <%}%> </td> </tr> <%}} else {%> <tr> <td colspan = "6" align = "Center"> nenhum dados ainda </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <//div> <//div> </miv> <//div> </div> <div style = "altura: 50px; altura de linha: 50px;"> <div style = "display: nenhum;"> <a href = "#" rel = "nofollow externo" rel = "nofollow externo" rel = "não <a href = "#" rel = "Nofollow externo" rel = "Nofollow externo" rel = "Nofollow externo" rel = "Nofollow externo" rel = "Nofollow externo"> weibo </a> | <a href = "#" rel = "Nofollow externo" rel = "Nofollow externo" rel = "não Noffixar "rel =" Nofollow externo "rel =" Nofollow externo "rel =" Nofollow externo "rel =" Nofollow externo "rel =" Nofollow externo "rel =" Nofollow externo "rel =" externo "Rel =" NOFollow "Rel =" Nofollow "Rel =" Nofollow "" Rel = "Sollow" NOCOLL "=" Rel = "Nofollow" Rel = "Nofollogo externo" rel = "Nofollow externo" rel = "Nofollow externo" rel = "Nofollow externo" rel = "Nofollow externo" rel = "Nofollow externo" rel = "Nofollow externo" nofollow "> blog </a> NOF | <a href ="#"Rel =" Nofollow "Rel =" Externo Sollow "NOCOLG" = "Relsollof> external <a href = "#" rel = "Nofollow externo" rel = "Nofollow externo" rel = "não type = "text/javascript"> </script> <script src = "/cvc/Center/js/cached_lay_reports_cus.js" type = "text/javascript"> </script> <div id = "mask"> </div> <divd = "addlogo" style = "Display: Nenhum; Z-Index: 12; Largura: 800px; Altura: Auto; margem-esquerda: -50px;"> <div> <span style = "font-size: 16px; margin-left: 20px; cor: #fff; margin-top: -5px; </div> <div id="addZ"> <div id="registerDiv"> <form id="menuForm" method="post" action="<%=path %>/webCenter.do"> <input type="hidden" name="method" value="saveOrUpdateMenu"> <input type="hidden" name="pageIndex" value="1"> <input type="hidden" name="conId" value = "< %= conid %>"> <input type = "hidden" name = "numb1" value = "< %= numb1 %>"> <input type = "hidden" name = "numb2" value = "< %= numb2 %>"> <input Type = "hidden id =" menu "name =" menu "MENU") Nome </span> </td> <td> <input type = "text" id = "menu_name" name = "menuname" style = "margem: 10px 0px; display: inline-block; altura: 34px;"/> <rpa> </span> </td> </tr> <!-<tr> <td> menu: name = "menu_level" style = "margem: 10px 0px"> <opção value = "-1"> Selecione ... </pption> <opção value = "1"> menu de primeiro nível </pption> <opção value = "2"> menu de segundo nível </option> </select> </span> </td> </tr> <d id idan <bs> "Menu </select> </span> </td> </tr> <d idan" "" </select> </span> </td> </tr> <ds <ds> " </td> <td> <select id = "menus_parent" "name =" menu_parent "style =" margem: 10px 0px "> <opção value ="-1 "> selecione ... </option> </select> </span> </td> </td> </</tr>-<tr> <t> type </td> style = "margem: 10px 0px; display: block inline; largura: 350px;"> <opção value = "-1"> por favor, selecione ... </pption> <opção value = "1"> type </pption> <opção <tr idi = ">"> link type </option> </select> </td> </tr> <r id id = ">"> <td> <textários linhas = "45" cols = "70" name = "menuContent" id = "menuContent" style = "display: embusteira em linha; style="color:red">http://</span>For example:http://www.baidu.com</br><input type="text" id="menuUrl" name="menuUrl" style="margin:10px 0px"/><span style="margin:10px 0px"></span></td> </tr> <tr> <td align = "Center" colspan = "2"> <hr style = "margin-bottom: 10px;"> <input id = "menu_add" type = "button" value = "add" style = "border-radius: 0; largura: 260px; altura: 40px; margin: automoth; </div> </div> </div> <div id = "childmenu" style = "display: nenhum; z-index: 12; largura: 650px; altura: automático; margem-left: -325px;"> <div id = "childz"> <div estilo = "margin-top: -40px; 16px; margem-esquerda: 20px; cor: #fff "id =" gn_title "> menu de segundo nível </span> <a id =" close_modal "> </a> </div> <div id =" registerdiv "> <tabela celular =" 0 "style =" word-lap: brok-word; Break-Break: Break-All; Table-Layout: Herit; "> <Thead> <tr> <th style =" text-align: Center "> Número </th> <th align =" center "style =" text-align: centro "> Nome do menu: </th> <th th th" center "=" text-align: Centre "> Menu </th> menu </th> <th align = "center" style = "text-align: center"> type de menu </th> <th align = "center" style = "text-align: center"> modificar </th> <th align = "center" style = "text-align: center"> delete </th> </thin) src = "<%= caminho%>/cvc/central/js/my97datepicker/wdatepicker.js"> </script> <script src = "<%= path%>/cvc/center/js/seting.js" type = "text/javascript"> </script> <script> src = "<%= caminho%>/cvc/central/js/validform_v5.3.2.js" type = "text/javascript"> </script> <script charset = "utf-8" src = "<%= path%>/trem/js/prettify/Kindeditor.js"> </script> src = "<%= caminho%>/trem/js/prettify/lang/zh_cn.js"> </script> <script charset = "utf-8" src = "<%= path%>/tren/js/prettify/plugins/code js.js"> </script> <script> %>/cvc/Center/js/jQuery-1.10.2.min.js "> </script> <script charset =" utf-8 "type =" text/javascript "src =" < %= path %>/cvc/center/js/jQuery-1.10.2.min.js "> </script> </script> </script> </script> src = "< %= PATH %>/centro/js/jQuery-ui.min.js"> </script> <cript> var editor1; */if (menuname == "inglês") {alert ("Vá para o módulo de informação básica para definir a conferência atual do tipo chinês e inglês"); if (json.state == 1) {window.location.reload (); Parada de animação: função (Evento, UI) {// Após a atualização da classificação VAR CategoryIds = $ ("#ShowTable"). Sortable ("Toarray"); 1 nível; 1) {content += nível: " url: "<%= caminho%>/webcenter.do?UpDatemenulevel", tipo: "post", Datatype: "json", dados: "menulist ="+conteúdo, sucesso: function (json) {}})}}}); $ ("#menu_level"). altere (function () {$ ("#menu_parent"). Empty (); $ ("#menu_parent"). Append ("<opção Value = '-1'> Selecione ... </pption>") var nível = $ ("#menu_level"). 2) {$ .ajax ({url: "<%= caminho%>/webcenter.do?getfirstmenu", tipo: "get", datatype: "json", success: function (resultado) {if (resultado! value = '"+resultado [i] .Menuid+"'> "+resultado [i] .Menunome+" </pption> "console.log (option) $ ("#menu_parent "). Append (option);}} else {alert (" sem menu de nível foi criado ainda, criar o primeiro menu de níveis antes do telefone "; }}) // Selecione o tipo gráfico $ ("#Menutype"). Alterar (function () {if ($ ("#menutype"). if ($ ("#menutype"). val () == 2) {$ ("#imgtexttr"). hide (); $ ("Menu_name"). Val (); FALSO; content "); retornar false;}} if ($ ("#menutype "). O MENU () $ ("#addlg"). Clique (function () {$ ("#Mask"). show (); $ ("#addLogo"). show ();}) // cancelar $ (". #zshref "). Val (" "); $ ("Body"). CSS ("posição", "fixado"); $ (#menu_name "). editor1.html (Data.Content); }}%>Código de ação
@RequestMapping (params = "updatemenulevel", métod = requestmethod.post) public void updateMenulevel (String menulist, httpServletReQuest Solicy, httpServletResponse resposta) {try {httpSession = this.getSession (request); AdminUser adminUser = session.getAttribute ("CenterAdminUser") == null? if (adminUser == null) {try {Response.sendRedirect (request.getContextPath ()+"/Center/Index.jsp"); } catch (Exceção e) {e.printStackTrace (); }} else {string conid = request.getSession (). getAttribute ("conid") == null? null: request.getSession (). getAttribute ("conid"). ToString (); if (conid == null) {Response.sendRedirect (request.getContextPath ()+"/Center/Index.jsp"); } JsonArray Array = JsonArray.FromObject (menulista); for (int i = 0; i <array.size (); i ++) {jsonObject json = array.getjsonObject (i); Menu do menu = WebService.getMenubyId (json.getint ("menuId")); MENU.SETLEVEL (JSON.GETINT ("nível")); WebService.SaveObject (Menu); }}} catch (Exceção e) {e.printStackTrace (); }O exemplo acima da tabela de implementação do Java T arrastando é todo o conteúdo que compartilhei com você. Espero que você possa lhe dar uma referência e espero que você possa apoiar mais o wulin.com.