Unicode Encoding... Gettting UTF-8 我使用此代碼...如何使用Unicode編碼創建使用java腳本的文本文件?
var content = 'demo';
uriContent = "data:application/text," + encodeURIComponent(content);
var link = document.createElement('a');
link.setAttribute('href', uriContent);
link.setAttribute('download', '22ddd' + '.txt');
link.click();
在文本文件中的內容將在印地文的語言,這將進一步轉化爲APS字體。客戶端可用的字體轉換器軟件在編碼爲Unicode時工作。我能夠正常下載文本文件,但它是UTF-8編碼
你看過這篇文章嗎? http://stackoverflow.com/questions/5403912/create-a-text-file-using-javascript – oneNiceFriend
可能重複的[使用JavaScript創建文本文件](http://stackoverflow.com/questions/5403912/create- a-text-file-using-javascript) –
@oneNiceFriend:我不認爲提問者想用'ActiveX'來創建一個文本文件。它很舊,只適用於Internet Explorer。 – ventiseis