基于 iframe 文件上传的 jQuery Ajax 传输插件 jQuery-Iframe-Transport

码农软件 · 软件分类 · jQuery 文件上传 · 2019-12-13 19:29:45

软件介绍

jQuery-Iframe-Transport 是一个基于 iframe 文件上传的 jQuery Ajax 传输插件,通过隐藏的 iframe 来实现传输。

要使用这个插件,只需简单的添加一个值为 true 的 iframe 选项到设置了 $.ajax() 调用的 Ajax 中,然后使用 files 选项指定要包含在子控件中的文件字段,该选项可以是选择器、jQuery 对象或包含一个或多个 <input type="file"> 元素的 DOM 列表:

$("#myform").submit(function() {
    $.ajax(this.action, {
        files: $(":file", this),
        iframe: true
    }).complete(function(data) {
        console.log(data);
    });
});

该插件将构造隐藏的 <iframe> 和 <form> 元素,然后将文件字段添加到该表单,并提交表单处理响应。

本文地址:https://www.codercto.com/soft/d/21082.html

Algorithms Illuminated (Part 2)

Algorithms Illuminated (Part 2)

Tim Roughgarden / Soundlikeyourself Publishing, LLC / 2018-8-5 / USD 17.99

Algorithms are the heart and soul of computer science. Their applications range from network routing and computational genomics to public-key cryptography and machine learning. Studying algorithms can......一起来看看 《Algorithms Illuminated (Part 2)》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

在线进制转换器
在线进制转换器

各进制数互转换器

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换