|
沙发
楼主 |
发表于 2014-2-15 12:23:56
|
只看该作者
下面的代码是已测试通过的
- <script> function send_2page_f(formname,page1,target1,page2,target2)
- {
- with(eval("document."+formname))
- {
- action=page1
- target=target1
- submit()
- action=page2
- target=target2
- submit()
- } } </script> <form name="form">
- <input type="button" onclick='send_2page_f("form","01.asp","01","02.asp","02")' value="提交">
- </form>
复制代码
_____________________________________________________________________________
我的改写,用图片提交:
- <script language="javascript">
- function send_2page_f(formname,page1,target1,page2,target2)
- {
- with(eval("document."+formname))
- {
- action=page1
- target=target1
- submit()
- action=page2
- target=target2
- submit()
- } } </script><form name="search" method="post">
- <tr>
- <td height="20" align="center" width="330"><input name=txtitle type=Text id=txtitle size=40 maxlength=50 /></td><td >
- <INPUT type=image onclick='send_2page_f("search","searchnews.asp","01","search.asp","02")' height=20 width=54 style="border:0px;" src="images/2/index_38.gif"></td>
- </tr>
- </form>
复制代码
|
|