Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to download generated Stream Files with Ajax

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces Ajax how to generate stream file download, the article is very detailed, has a certain reference value, interested friends must read!

The code is as follows:

//bind export button $("#btnExport").clickCheckLogin(function () { var form = $(""); form.attr('style', 'display:none'); form.attr('target', ''); form.attr('method', 'post'); form.attr('action', 'AjaxPost.aspx'); var input1 = $(''); input1.attr('type', 'hidden'); input1.attr('name', 'type'); input1.attr('value', 'Export'); var input2 = $(''); input2.attr('type', 'hidden'); input2.attr('name', 'fileId'); input2.attr('value', fileId); $('body').append(form); form.append(input1); form.append(input2); form.submit(); form.remove(); });

Post parameters to background.

The above is "Ajax how to generate stream file download" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report