<input name=a>
<input name=b>
<input name=c>
<input name=d>
<input type=button onclick="bb()">计算
<script>
function bb()
{
w=window.open()
w.document.write(a.value+','+b.value+','+c.value+','+d.value)
w.document.execCommand("SaveAs",true,a.value+".txt")
}
</script>