通过bootstrap-fileupload实现文件上传成功后的回调
来源:互联网 发布:淘宝化妆品销售排名 编辑:程序博客网 时间:2024/05/17 22:10
<script> $("#update_csv").fileinput({ showUpload: false, language:'zh', uploadAsync:true, dropZoneEnabled:false, uploadUrl:'http://www.soyiyuan.com/', maxFileCount: 1, maxImageWidth: 600, resizeImage: false, showCaption: false, showPreview: false, browseClass: "btn btn-primary btn-lg", allowedFileExtensions : ['csv', 'txt'], previewFileIcon: "" }).on("filebatchselected", function(event, files) { $(this).fileinput("upload"); }) .on("fileuploaded", function(event, data) { if(data.response) { alert('处理成功'); } });</script>
.on("filebatchselected", function(event, files) { $(this).fileinput("upload"); })
是jquery的方法,实现文件自动上传
.on("fileuploaded", function(event, data) { if(data.response) { alert('处理成功'); }
是jquery的方法,实现文件上传成功后的提示
<script type="text/javascript">$("#input-ficons-4").fileinput({ uploadUrl: "AdImgServlet?flag=adimgadd&time="+new Date().getTime(), previewFileIcon: '<i class="fa fa-file"></i>', allowedPreviewTypes: 'jpg', // disable preview of standard types allowedPreviewMimeTypes: ['image/jpeg', 'text/javascript'], // allow content to be shown only for certain mime types dropZoneTitle: '请通过拖拽或下方的"选择"按钮的方式将jpg格式的广告图片文件放到这里 …', previewFileIconSettings: { 'docx': '<i class="fa fa-file-word-o text-primary"></i>', 'xls': '<i class="fa fa-file-excel-o text-success"></i>', 'xlsx': '<i class="fa fa-file-excel-o text-success"></i>', 'pptx': '<i class="fa fa-file-powerpoint-o text-danger"></i>', 'pdf': '<i class="fa fa-file-pdf-o text-danger"></i>', 'zip': '<i class="fa fa-file-archive-o text-muted"></i>', }}).on("fileuploaded", function(event, data) { if(data.response) { //window.location.href="adimgslist.jsp"; window.setTimeout("window.location='adimgslist.jsp'",3000); } });</script>上述文件实现文件“选择”后点击“上传”按钮后3秒后自动跳转到adimgslist.jsp页面
1 0
- 通过bootstrap-fileupload实现文件上传成功后的回调
- 通过FileUpload实现文件的上传
- Struts2通过commons-fileupload实现文件上传
- Struts2通过commons-fileupload实现文件上传
- Struts2通过commons-fileupload实现文件上传
- 通过commons-fileupload实现文件上传
- 通过bootstrap-fileupload上传文件时js库修改为默认中文的方法
- fileupload 实现文件上传
- fileUpload实现文件上传
- fileupload实现文件上传
- 文件上传fileupload实现
- 使用common-fileupload实现文件的上传
- 使用commons-fileupload实现文件的上传
- 使用common-fileupload实现文件的上传
- 使用common-fileupload实现文件的上传
- 使用common-fileupload实现文件的上传
- 使用FileUpload实现Servlet的文件上传
- Struts2之通过commons-fileupload实现文件上传
- Ajax应用,Struts2
- springMVC----拦截器
- FreeRTOS系列第5篇---FreeRTOS在Cortex-M3上的移植
- X264中的x264_encoder_encode和x264_nal_encode函数
- 关于在一个jsp提交表单时要注意的点
- 通过bootstrap-fileupload实现文件上传成功后的回调
- Spring从诞生之日起就是针对EJB的
- form的onsubmit验证
- Intent使用和Intent过滤器
- android TV 获取有线mac和无线mac
- 我是一个java class
- 评价函数
- 【OpenCV】直方图——一维
- LTE物理层概述及基本概念讲解