在form里怎样才能先执行button的onclick事件,再执行form的action??
在form里怎样才能先执行button的onclick事件,再执行form的action??
比如
<form name="AdapterForm1" method="post" action="/scripts/validate.dll">
<table align="center" width="400">
<tr>
<td align="left">
<table width="200" align="center">
<tr>
<td width="61" align="center"><font size="2">ID:</font></td>
<td width="127" > <font size="2">
<input type="text" name="name" size="12" maxlength="7" class="inputblue">
</font></td>
</tr>
<tr>
<td width="61" align="center"><font size="2">密
码:</font></td>
<td width="127" > <font size="2">
<input type="password" name="pwd" size="12" maxlength="16" class="inputblue">
</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left">
<table align="left" width="240">
<tr>
<td width="103"> </td>
<td width="44">
<input type="submit" value="登录" class="Buttonblue" onClick="AdapterForm1.__act.value='__id.33.validate.Adapter1.LoginMeetAction'" name="submit">
</td>
<td width="77">
<input type="reset" name="Reset" value="重置" class="Buttonblue">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
问题点数:0、回复次数:4Top
1 楼weiljj()回复于 2003-12-14 15:05:36 得分 0
可以將在Form外設一個Button,在這個Button的OnClick中提交此Form:
Sub btnOk_onclick()
...'其它操作.
'提交
frmxxx.action="yyy.asp"
window.frmxxx.submit()
End SubTop
2 楼bullion(与时代同步)回复于 2003-12-14 15:48:24 得分 0
用BUTTON作提交按钮,用JavaScript控制BUTTON
如:
<form name="theform" action="">
<input type="button" name="button" value="send" onclick="return btn()">
</form>
<script>
function btn()
{
theform.submit();
}
</script>Top
3 楼jfly301(海浪~~)回复于 2003-12-14 16:01:20 得分 0
<form name="theform" action="">
补充一下:
应该是这样的。
<input type="button" name="button" value="send" onclick="return btn()">
</form>
<script>
function btn()
{
docment.theform.action="yyy.asp";
docment.theform.submit();
}
</script>
Top
4 楼jfly301(海浪~~)回复于 2003-12-14 16:03:00 得分 0
不好意思,上面汉字怎么写到下面了,Top
相关问题
- 请问graphics.DrawString("dd",....);写在Form_Load()中就执行,而写在OnPaint中才能执行,这是为什么呢?
- 怎样才能看到执行结果
- 这个语句如何才能执行?
- 请问:我一执行程序整个FORM就不能动了,须完成后才能做下一动作,怎么样才能在执行的过程中设个按钮把它终止?
- 怎么才能让我的button的onclick事件执行一次?一个有几年delphi编程经验的人的疑惑!
- 一个button内调用了一个需要执行较长时间的函数,点击后要等很长时间,按纽才能再次点,怎么办?
- Runtime.getRuntime().exec 可以执行.bat文件么?不能的话怎么才能执行??
- BUTTON定时执行动作
- 高手们,帮帮我!ADO编程,我怎么才能执行一个SQL语句,如我要执行Select f1,f2 form data where id=12 并且要将获取的值存入str1,str2变量中,怎么做呀?小弟初学Delphi,还望各位多多指教!
- 提问:如何才能执行PB应用程序?




