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. Friends who are interested can learn more.
I learned another trick today. I didn’t know it before, but I have done too few things...
Goal: Click the link to pop up the file download dialog box
Code:
The code is as follows:
<html> <head>代码下载</head> <title>代码下载</title> <body> <a href="Web.rar" >download</a> </body> </html>
If the browser supports the format that can be opened, it will open it directly online by default (such as word or picture). If the format is not supported, it will pop up a download prompt. It is best to make a file in .rar format
For more examples of how to use href in HTML to pop up a file download dialog box when clicking a link, please pay attention to the PHP Chinese website for related articles!