HTML <area> download attribute

ການສະແດງ ແລະ ການນໍາໃຊ້

download attribute ສະແດງວ່າບາງຢ່າງທີ່ຈະດາວໂຫລດຜູ້ນຳໃຊ້ ເວລາທີ່ລາວຫລຸດຢູ່ທີ່ກໍລະນີ:href attribute ທີ່ກ່ຽວກັບ filename)

download ຄວາມມູນຄ່າທີ່ຄິດຫວັງຂອງ attribute ຈະກາຍເປັນຊື່ຫລັງວິດີໂອພາຍຫລັງດາວໂຫລດ (ຄວາມມູນຄ່າທີ່ຄິດຫວັງຈະກາຍເປັນຊື່ຫລັງວິດີໂອພາຍຫລັງດາວໂຫລດ):

ຖ້າຫາຍຄວາມມູນຄ່ານັ້ນ ຈະໃຊ້ຊື່ຫລັງວິດີໂອເບື້ອງເດີມ:

ຄວາມຄິດຕົວ

ຕົວຢ່າງ 1

ສະແດງວ່າຄວາມມູນຄ່າ download attribute ຈະເປັນບາງຢ່າງທີ່ຈະດາວໂຫລດຜູ້ນຳໃຊ້ ເວລາທີ່ລາວຫລຸດຢູ່ທີ່ກໍລະນີ:

<map name="planetmap">
<area shape="rect" coords="0,0,114,576" alt="Sun" href="about_sun.html" download>
<area shape="circle" coords="190,230,5" alt="Mercury" href="about_mercury.html" download>
<area shape="circle" coords="228,230,5" alt="Venus" href="about_venus.html" download>

亲自试一试

ຕົວຢ່າງ 2

ສະແດງວ່າຄວາມມູນຄ່າ download attribute ຈະເປັນຊື່ເພື່ອຫລັງວິດີໂອດັ່ງກ່າວ (ຕົວຢ່າງ: sun.htm ແທນ information_about_the_sun.htm):

<map name="planetmap">
<area shape="rect" coords="0,0,114,576" alt="Sun" href="about_sun.htm" download="sun">
Mercury
Venus

亲自试一试

语法


属性值

描述
filename 可选。规定下载文件的新文件名。

浏览器支持

表中的数字注明了首个完全支持该属性的浏览器版本。

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
14.0* 18.0 20.0* 10.1 15.0

* Chrome 65+ ແລະ Firefox ສະໜັບສະໜູນການດາວນານວຽງຂອງແຫຼມມອນ.