【发布时间】:2020-07-18 21:12:47
【问题描述】:
这里是新手。
我正在向here 学习,但我遇到了问题。
原始脚本在demo 中运行良好。
HTML:
<!DOCTYPE html>
<html>
<body>
<h1>The a download attribute</h1>
<p>Click on the image to download it:<p>
<a href="/images/myw3schoolsimage.jpg" download>
<img src="/images/myw3schoolsimage.jpg" alt="W3Schools" width="104" height="142">
</a>
<p><b>Note:</b> The download attribute is not supported in IE or Edge (prior version 18), or in Safari (prior version 10.1).</p>
</body>
</html>
但如果我将/images/myw3schoolsimage.jpg 更改为https://stackoverflow.com/questions/156686/how-to-start-automatic-download-of-a-file-in-internet-explorer.html,它会转到网站。
但我希望它在单击 URL 时将网页下载为 HTML 文件。
类似于在页面上右键单击链接并在 safari 中选择“下载链接文件”。
顺便说一句,我正在使用 safari 13.0.3。 我该怎么做?
【问题讨论】:
标签: html