Complete set of reply encountered a small problem

Sunday's complete set of reply, within 10 minutes required to change a style teachers need, I received on the topic: in the left menu column plus a new navigation "delete", when you click this button, the first prompt, then the deletion of article 99 records in the database corresponding to the task. So the system is set up with a complete framework Layui the foreground, the background was a SSH (Spring, SpringMVC, Hibernate), not directly to the database operations, so I quoted JS, when you click the button corresponding to the path passed Controller.

I left navigation tree database is completed, the revised resource and role_resource two tables

 

 Tip box and must be written in JavaScript

1 <script type="text/javascript"> 
2     function del(){ 
3         if(!confirm("确认要删除?")){ 
4             window.event.returnValue = false; 
5         } 
6     } 
7 </script> 

Jsp pages from the transmitted data to the database is used to give a button

1 <a href='/warningTask/deleteOne?id=99' onclick="return del()">删除</a> 

当点击此按钮时,弹出确认对话框,而后把数据传入到Controller,剩下的过程我就不在这里赘述了,因修改时间有限,最终删除成功后的界面有些丑陋

 

 

Guess you like

Origin www.cnblogs.com/yjh123/p/10955909.html