Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- function save_content_to_file(content, filename)
- {
- var dlg = false;
- with(document){
- ir=createElement('iframe');
- ir.id='ifr';
- ir.location='about.blank';
- ir.style.display='none';
- body.appendChild(ir);
- with(getElementById('ifr').contentWindow.document){
- open("text/plain", "replace");
- charset = "utf-8";
- write(content);
- close();
- document.charset = "utf-8";
- dlg = execCommand('SaveAs', false, filename+'.txt');
- }
- body.removeChild(ir);
- }
- return dlg;
- }
- save_content_to_file("Hello", "C:\\test");
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement