var $eleForm = $("<form method="get"></form>")
$eleForm.attr("action", "xxxxxxx")
$(document.body).append($eleForm)
pdf a
<a href="xxxx" download></a>
var $eleForm = $("<form method="get"></form>")
$eleForm.attr("action", "xxxxxxx")
$(document.body).append($eleForm)
pdf a
<a href="xxxx" download></a>
turn off the default opening function of the browser
not all browsers can open files. You can download it directly by changing it to Sogou browser
or 360browser
. I think you should be using Chrome browser
now, so you will open PDF files. This function can be turned off in the settings. Chrome browser
can open pictures and PDF files by default, and other files can be downloaded using the above method.
download this is a new attribute, which is not supported by some browsers. To download or open it directly, it is set by the backend interface content-Type
to fully support downloading, you need to rely on the backend
Previous: The globe in the official example of Echarts is not dragged on the mobile end, how can I add it?