2015-11-04 88 views
-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(); 
} 

回答

1

Safari 5的是,和does not support the File API(你必须点击“全部显示”按钮才能看到它)。几年前,Windows上的Safari 5已被Apple放弃,并未收到安全更新,并且存在许多已知的安全漏洞。底线:不要在Windows上使用Safari 5,如果这样做,不要指望它支持现代Web技术。

+0

谢谢,有没有其他的选择? – sai

+1

@vijaysai:?!不知道... Chrome?火狐? IE9 +?歌剧? –

+0

在除safari之外的所有浏览器中工作 – sai