简体   繁体   English

而不是图像下载,它在另一个选项卡中打开

[英]Instead of image download it is opening in the another tab

单击图像时,该图像在另一个选项卡中打开

<a href="~/images/ProofPics/@idproofrow.ItemArray.GetValue(i + 2)" title="Download Image" style="text-decoration:underline;"><i class="fa fa-download" aria-hidden="true"></i> Image Download</a> 

You can use download attribute in your <a> tag. 您可以在<a>标记中使用download属性。

<a href="/image.jpg" download>Download</a>

Though keep in mind that this only support the modern browsers . 但是请记住,这仅支持现代浏览器 You can check this link for the supported browsers available 您可以检查此链接以了解可用的受支持的浏览器

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 点击下载MP3而不是打开标签 - Download MP3 on click instead of opening tab 从 s3 存储桶在 web 中强制下载移动应用程序上传的图像。 它在选项卡中打开而不是下载 - Download mobile app uploaded image forcefully in web from s3 bucket. It is opening in tab instead of downloading 如何通过点击链接下载图像而不是打开它 - How to download a image on link click instead of opening it 文件(pdf、jpg、png)下载而不是在新标签中打开 - File (pdf, jpg, png) download instead of opening in new tab 从 URL 下载 pdf 而不是在新选项卡中打开 - Download pdf from a URL instead of opening in a new tab Safari blob下载影响表单提交 - 结果表单发布后下载而不是在新标签中打开 - Safari blob download affects form submit - results in form post getting downloaded instead of opening in new tab 单击按钮而不是打开新选项卡(HTML 或 JavaScript)时如何触发文件下载 - How to trigger a file download when clicking an button instead opening a new tab (HTML or JavaScript) 如何在单击时自动下载 PDF 而不是使用 js 在新选项卡中打开它? - How to download PDF automatically on click instead of opening it in new tab using js? JavaScript 下载文本文件而不是打开 - JavaScript to download textfiles instead of opening 如何在不打开新选项卡中的图像的情况下在锚点标签上下载图像文件? - How to download image file on anchor tag click without opening image in new tab?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM