Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有可能做这样的事情吗?
$.post( '/generate/file', json_data_striginfied, function( data ) { var win = window.open() window.write(data) });
返回的数据是二进制数据(PDF 文件)?
我已经尝试过了,新窗口包含二进制数据作为文本,它不会强制下载。我希望它强制下载 PDF 文件。
尝试将远程 PDF url 添加到新窗口源 url。