Internship Effect: Click on the Red Fork to delete, the entire page address is unchanged, to achieve local refresh
In the JSP page:
<pre name= "code" class= "java" ><c:foreach items= "${files}" var= "item" varstatus= "I" > & Lt;input type= "hidden" id= "FileId" value= "${item.id}"/> <a style= "display:inline-block;width:250px;" href= "Dow Nload.htm?fileid=${item.id}&&assetid=${item.assetid} ">${item.fileName}</a> <a style= "color:red;background-color:ghostwhite;text-align:center;display:inline-block;width:25px;"
Id= "Delete${i.count}" >X</a><br/><br/> <script> $ (document). Ready (function () {
$ ("#delete ${i.count}"). Click (function () {$.ajax ({type: "POST", URL: "filedelete.htm", data: {fileid:$ ("#fileId"). Val ()}, Success:function ()
{window.location.reload (); })}) </script> </c:foreach>
In the controller:
@RequestMapping ("Filedelete") public
String Filedelete (Long fileId) {
bizassetreviewservice.deletefile ( FILEID);
return "Biz/asset/assetedit";//Return to the original JSP page
}