-1
我得到的Safari浏览5X这个问题与Windows的Safari浏览5X:问题与窗口
'[object BlobConstructor]' is not a constructor (evaluating new Blob ([Myscript], { type: 'text/plain' })
这里是我的代码:
var downloadLink = document.createElement("a");
downloadLink.download = fileNameToSaveAs;
downloadLink.innerHTML = "Download File";
if (window.webkitURL != null) {
downloadLink.href = window.webkitURL.createObjectURL(textFileAsBlob);
} else {
downloadLink.href = window.URL.createObjectURL(textFileAsBlob);
downloadLink.style.display = "none";
document.body.appendChild(downloadLink);
}
downloadLink.click();
$(downloadLink).parent().find(downloadLink).remove();
}
谢谢,有没有其他的选择? – sai
@vijaysai:?!不知道... Chrome?火狐? IE9 +?歌剧? –
在除safari之外的所有浏览器中工作 – sai