Home > Web Front-end > JS Tutorial > body text

A small example of JQuery's AJAX implementation of file download_jquery

WBOY
Release: 2016-05-16 17:33:52
Original
996 people have browsed it

Copy code The code is as follows:

var form=$("
") ;//Define a form
form.attr("style","display:none");
form.attr("target","");
form.attr("method" ,"post");
form.attr("action","exportData");
var input1=$("");
input1.attr("type"," hidden");
input1.attr("name","exportData");
input1.attr("value",(new Date()).getMilliseconds());
$("body ").append(form);//Place the form in the web
form.append(input1);

form.submit();//Form submission

Source: http://www.cnblogs.com/sydeveloper

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template