高分求代码!一个静态网页中有两个文本框和一个“提交”按钮,当点击“提交”按钮时有如下功能!
1个回答
展开全部
<form id="form1">
<input id="text1"><input id="text2"><button onclick="regto()">提交</button>
</form>
<script type='text/vbscript'>
function regto()
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateTextFile("c:\保存路径.txt", True)
f.write form1.text1.value & chr(13) & chr(10) & form1.text2.value
f.close
set f = nothing
set fso = nothing
document.URL = "跳转到网址"
end function
</script>
<input id="text1"><input id="text2"><button onclick="regto()">提交</button>
</form>
<script type='text/vbscript'>
function regto()
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateTextFile("c:\保存路径.txt", True)
f.write form1.text1.value & chr(13) & chr(10) & form1.text2.value
f.close
set f = nothing
set fso = nothing
document.URL = "跳转到网址"
end function
</script>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询