function download(filename, datalist) {
	let ele = document.createElement('a');
	ele.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(datalist));
	ele.setAttribute('download', filename);
	ele.style.display = 'none';
	document.body.appendChild(ele);
	ele.click();
	document.body.removeChild(ele);
}
// Set download automatically as a text file
Set download automatically as a text file
Set download automatically as a text file
function download(filename, datalist) {
	let ele = document.createElement('a');
	ele.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(datalist));
	ele.setAttribute('download', filename);
	ele.style.display = 'none';
	document.body.appendChild(ele);
	ele.click();
	document.body.removeChild(ele);
}
function download ( filename , datalist ) { let ele = document . createElement ( 'a' ) ; ele . setAttribute ( 'href' , 'data:text/plain;charset=utf-8,' + encodeURIComponent ( datalist ) ) ; ele . setAttribute ( 'download' , filename ) ; ele . style . display = 'none' ; document . body . appendChild ( ele ) ; ele . click ( ) ; document . body . removeChild ( ele ) ; }
Set download automatically as a text file
Set download automatically as a text file