<!DOCTYPE html> <html> <head> <script type="text/javascript" src="./jquery-1.8.2.min.js"></script> <!-- <script type="text/javascript" src="./jquery.uploadifive.min.js"></script> <link rel="stylesheet" type="text/css" href="./uploadifive.css" /> --> <title>终止申请表单</title> </head> <style> td{ width: 180px; } </style> <body> <table> <tr> <td>申报号:</td> <td><%=projid%></td> </tr> <tr> <td>模板下载:</td> <td> <a href="<%=templatePath%>" download="终止申请书" target="_blank">申请表</a> </td> </tr> <tr> <td>上传附件:</td> <% if(downloadpath!=null&&!downloadpath.equals("")){ %> <td> <a href="<%=downloadpath%>" target="_blank">下载已上传文件</a> </td> <% }else{ %> <td> <form id="form1" target="framName" action="/was/zzsb/uploadZzsbFile.action" method="post" enctype="multipart/form-data" > <input type="hidden" name="belongTo" value="${nodeAttr_three.unid}"/> <input type="hidden" name="projid" value="<%=projid%>"/> <input type="file" name="file"/> <input type="submit" value="上传" /> </form> <div > <iframe id="myiframe" src="" name="framName" style="display: none;"></iframe> </div> </td> <% } %> </tr> </table> </body> </html> <script type="text/javascript"> var myiframe = 'myiframe'; jQuery(function() { jQuery('#form1').submit(function() { var $_this = jQuery(this); $_this.attr('action', '/was/zzsb/uploadZzsbFile.action'); //Todo 根据实际情况添加验证规则 return verify_works_publish_form(); }); iframe = document.getElementById(myiframe); if (iframe.attachEvent) { //兼容IE iframe.attachEvent("onload", function() { iframe_loaded(); }); } else { // ff, chrome iframe.onload = function() { iframe_loaded(); }; } }); function iframe_loaded() { window.location.reload(); } /** * 验证表单 * * @access public * @return void */ function verify_works_publish_form() { return true; } </script>
download="终止申请书" 这个属性是下载文件重命名的(只有谷歌、火狐等浏览器支持);
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。