大家帮帮我看看这个提交表单如何写?
主页面index.asp,此页面下有下面这个表单
<form name= "form1 " method= "post " action= " ">
<input name= "abc " type= "text " id= "abc ">
<input type= "submit " name= "Submit " onClick= "form1.action= 'a.asp ';form1.submit() "value= "提交1 ">
<input type= "submit " name= "Submit " onClick= "form1.action= 'b.asp ';form1.submit() "value= "提交2 ">
</form>
我现在想做的是点击提交1或提交2后,将这个form1表单的内容提交到a.asp或b.asp页面里。a.asp或b.asp要在新的页面中打开,index.asp页面自动关闭。
请问各位大侠如何改上面的这段代码?谢谢大家
------解决方案-------------------- <input type= "button " name= "button1 " onClick= "form1.action= 'a.asp ';form1.submit() "value= "提交1 ">
<input type= "button " name= "button2 " onClick= "form1.action= 'b.asp ';form1.submit() "value= "提交2 ">
------解决方案-------------------- <form name= "form1 " method= "post " action= " " onsubmit= "window.close(); " target= "_blank ">
<input name= "abc " type= "text " id= "abc ">
<input type= "button " name= "button1 " onClick= "form1.action= 'a.asp ';form1.submit(); "value= "提交1 ">
<input type= "button " name= "button2 " onClick= "form1.action= 'b.asp ';form1.submit(); "value= "提交2 ">
</form>
------解决方案--------------------在onclick那里另外调用一个自己写的javascript函数,还js函数里面location.herf到你想要的页面,同时windows.close掉你的index.asp,具体函数不记得了,自己查查函数表
------解决方案--------------------不要新窗口打开呀,自然关了
------解决方案--------------------本窗体关闭我记的。
window.close后会弹窗口问是否要关闭。
很不友好