2
我有以下代碼在Chrome和Firefox的作品,但在IE的Javascript的createElement不能在IE
<script>
var element = document.createElement("a");
element.setAttribute("href", "http://example.com/")
element.setAttribute("target", "_blank")
element.setAttribute("download", "")
element.click();
element.remove();
</script>`
無論
<script>
var element = document.createElement("a");
element.setAttribute("href", "http://example.com/")
element.setAttribute("target", "_blank")
element.click();
element.remove();
</script>`
'download'屬性在'IE'中不起作用 –
我以前見過這個,但是在刪除'download'屬性後它不能在IE中工作 –