js另存代码功能

//另存代码
function saveCode(id,savename) {
        var winname = window.open('','','width=0,height=0,top=200,left=200px');
        winname.document.open('text/html', 'replace');
        winname.document.write(obj.value);
        winname.document.execCommand('saveas','',savename);
        winname.close();
}


by 雪洁 2012-01-14 20:14:43 2320 views
我来说几句

相关文章