<script>
function saveFile(T,content)
{//保存
var filename=document.all(T).value;
var win=window.open('','','top=10000,left=10000');
win.document.write(document.all(content).innerText);
win.document.execCommand('SaveAs','',filename)
win.close();
}
</script>
<form name="saveas" action="" method="post">
文件名称:<input type="text" id="title_1">
<br>
文件内容:<textarea id="content_1">
</text_area>
<br>
<input type="button" value="save as txt file" onClick=saveFile('title_1','content_1')>
</form>
中国足彩网信息请查看IT技术专栏