我在 ajax 事件的服务器端创建一个 word 文档,如果没有错误,我想将其推送下载作为响应。jquery ajax可以吗?我的代码如下所示
$.ajax({
type: "POST",
url: 'docsx.php',
data: $("#edit_form").serialize(), // serializes the form's elements.
success: function(data)
{
**here should be fired the download** // show response from the php script.
},
error:function(){
alert('Es gibt ein Fehler bei Daten übetragung!');
}
});