Home  >  Article  >  Web Front-end  >  A small example of JQuery's AJAX implementation of file download_jquery

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

WBOY
WBOYOriginal
2016-05-16 17:33:52990browse

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

Statement:
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