我可以使用示例文本来创建它。以下是代码段
var icsMSG = ["BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//Our Company//NONSGML v1.0//EN\nBEGIN:VEVENT\n" + attcament + "\nUID:me@google.com\nDTSTAMP:20120315T170000Z\nATTENDEE;CN=My Self ;RSVP=TRUE:MAILTO:me@gmail.com\nORGANIZER;CN=Me:MAILTO::test@gmail.com\nDTSTART:" + Date.now() +"\nDTEND:" + Date.now() +"\nLOCATION:" + "hyd" + "\nSUMMARY:Our Meeting Office\nEND:VEVENT\nEND:VCALENDAR"];
var blobObject = new Blob(icsMSG,{ type: 'text/calendar' });
window.navigator.msSaveBlob(blobObject, 'msSaveBlob_testFile.ics'); I tried the following way. But no luck. any ideas? var attcament = "ATTACH;ENCODING=BASE64;VALUE=BINARY;X-FILENAME=smritta.docx:"+Base64.encode(messagesArr[i].getContent());
var icsMSG = [“ BEGIN:VCALENDAR \ nVERSION:2.0 \ nPRODID:-// Our Company // NONSGML v1.0 // EN \ nBEGIN:VEVENT \ n” +附件+“ \ nUID:me @ google。 com \ nDTSTAMP:20120315T170000Z \ nATTENDEE; CN =我的自我; RSVP = TRUE:MAILTO:me@gmail.com \ nORGANIZER; CN = Me:MAILTO :: Tamara1@testexch.local \ nDTSTART:“ + Date.now()+ “ \ nDTEND:” + Date.now()+“ \ nLOCATION:” +“ hyd” +“ \ n摘要:我们的会议办公室\ nEND:VEVENT \ nEND:VCALENDAR”]; var blobObject = new Blob(icsMSG,{type:'text / calendar'}); window.navigator.msSaveBlob(blobObject,'msSaveBlob_testFile.ics');