更新时间:2023-01-24 11:18:27
要使其在Firefox中运行,只需将新元素插入DOM(apendChild
等).
To make it work in Firefox, just insert the new element into the DOM (apendChild
, etc).
我认为这不适用于Safari:
I don't think this will work in Safari:
<a download="">
(正确),AFIAK.例如. a.download =
不会做您想要的.您仍然可以使用setAttribute
,但是Safari仍然会忽略它.<a download="">
isn't (properly) supported yet, AFAIK. E.g. a.download =
will not do what you want. You could still use setAttribute
but Safari will still ignore it.