一、發郵箱
<a href="mailto:[email protected]" style="color: inherit; text-decoration: none">[email protected]</a>
二、打電話
<a href="tel:18501981333"></a>
三、下載
但是有個情況,比如txt,png,jpg等這些瀏覽器支持直接打開的文件是不會執行下載任務的,而是會直接打開文件,這個時候就需要給a標籤添加一個屬性“download”;
<a href="/user/test/xxxx.txt" download="文件名.txt">點擊下載</a>