您的位置:首页 > 其它

当我们想点击一个链接实现删除或者类似的功能,想给出一个提示,具体实现方法

2017-03-21 11:45 211 查看
  <td>  

 <a href="${servePath}/file/download?fileName=${object.fileName}&&hdfsPath=${object.hdfsPath}" title="下载"><img   src="${staticServePath}/app/lypjxt/images/edit.png" id="checkbox2" />下载</a>

   <a href="${servePath}/file/update?fileName=${object.fileName}&&hdfsPath=${object.hdfsPath}" title="更新" onclick="return update()" ><img   src="${staticServePath}/app/lypjxt/images/edit.png" id="checkbox2" />更新</a>

 <a href="${servePath}/file/download?fileName=${object.fileName}&&hdfsPath=${object.hdfsPath}" title="删除" onclick="return del()" ><img   src="${staticServePath}/app/lypjxt/images/edit.png" id="checkbox2" />删除</a>

  </td>

js代码

<!-- 删除文件的提示 -->

<script type="text/javascript">

function del(){

    if(confirm("真的要删除该文件吗?")){

        return true;

        }else{

        return false;

        }    

};

/*更新文件的提示  */

function update(){

    if(confirm("真的要删除该文件吗?")){

        return true;

        }else{

        return false;

        }    

};
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐