<form name="f" action="" method="post">
用户名:<input type="text" name="name"><br>
密码:<input type="text" name="password"><br>
<input type="button" value="submit1" onclick="javascript:document.f.action='test/test1';document.f.submit();"/>
<input type="button" value="submit2" onclick="javascript:document.f.action='test/test2';document.f.submit();"/>
<input type="button" value="submit3" onclick="javascript:document.f.action='test/test3';document.f.submit();"/>
<input type="button" value="submit4" onclick="javascript:document.f.action='test/test4';document.f.submit();"/>
</form>多个按钮提交同一个form
最新推荐文章于 2021-06-04 05:47:58 发布
本文展示了一个简单的HTML表单示例,其中包括用户名和密码输入框,并提供了四个不同的提交按钮,每个按钮都指向不同的处理页面。
756

被折叠的 条评论
为什么被折叠?



