使用下載屬性設定點擊超連結時要下載的檔案。將屬性值設定為下載檔案的名稱,例如image。
<!DOCTYPE html> <html> <body> <h3>if statement in Java</h3> <p>The following is an image explaining the concept if <b>if-statmement in Java</b> (Click to download):<p> <a href = "https://www.tutorialspoint.com/java/images/if_statement.jpg" download> <img border = "0" src = "https://www.tutorialspoint.com/java/images/if_statement.jpg" alt="Java" style="max-width:90%" style="max-width:90%"> </a> </body> </html>
以上是在HTML中,如何指定使用者在點擊超連結時下載目標檔案?的詳細內容。更多資訊請關注PHP中文網其他相關文章!