This article mainly introduces the use of href in HTML to realize the pop-up file download dialog box when clicking a link. It has certain reference value. Now I share it with you. Friends in need can refer to it.
Use href to implement File download, I didn’t know it before, today I learned a trick to click the link to pop up the file download dialog box, interested friends can learn about it
I learned another trick today, I didn’t know it before, I just did it There are too few things...
Goal: Click on the link to pop up the file download dialog box
Code:
##Copy code
The code is as follows:<html> <head>代码下载</head> <title>代码下载</title> <body> <a href="Web.rar" >download</a> </body> </html>
html The difference between empty link href="#" and href="javascript:void(0)"
The above is the detailed content of Use href in html to pop up a file download dialog box when clicking a link. For more information, please follow other related articles on the PHP Chinese website!