简体   繁体   English

下载.mp3文件而不是在Firefox或Chrome中播放它们?

[英]Download .mp3 file instead of playing them in firefox or chrome?

I am working on wordpress website and i want to save mp3 file in my pc. 我正在wordpress网站上工作,我想在我的PC中保存mp3文件。 But when i click on link, it open in same/new tab and start playing. 但是,当我单击链接时,它会在相同/新选项卡中打开并开始播放。 But i wanna that whenever user click on download button then mp3 will start downloading. 但是我想每当用户单击下载按钮时,mp3就会开始下载。 Can anyone help me how can I download an audio file (mp3) from a link and save it to my pc. 谁能帮我如何从链接下载音频文件(mp3)并将其保存到我的电脑中。

 <td data-th="Download Sound"><a href="https://www.example.com/meditation.mp3"><img title="Download MP3" src="https://i.imgur.com/jUu9ky3.png" alt="Download MP3" width="200" height="60" /></a></td> 

试试这个,对我有用

<a href="filepath" download> Download link </a>

Give a tag a download property a标签的download性能

       <td data-th="Download Sound">
           <a href="https://www.example.com/meditation.mp3" download="meditation.mp3">
              <img title="Download MP3" src="https://i.imgur.com/jUu9ky3.png" alt="Download MP3" width="200" height="60" />
          </a>
        </td>

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM