function DownLoadPost(url,data) { if (url && data) { var form = $(‘<form>{{ xsrf_form_html()|safe }}</form>‘); form.attr(‘action‘, url + "?rand=" + Math.random()); form.attr(‘method‘, ‘post‘); for (var item in data) { console.log(data[item]); var input = $(‘<input type="text" />‘); input.attr(‘name‘, item); input.attr(‘value‘, data[item]); form.append(input); } console.log(form.html()); form.appendTo(‘body‘).submit().remove(); }; }
原文地址:https://www.cnblogs.com/mypsq/p/8515634.html
时间: 2024-11-08 16:22:53