第1个回答 2013-07-04
可通过JS脚本控制表单的递交地址来实现,比如:
<input type="button" name="btnSubmit" value="确认定单" onclick="doSubmit()">
<input type="button" name="btnSubmit" value="撤消定单" onclick="doCancel()">
JS脚本如下:
<script language="javascript">
function doSubmit(){
var frm=document.form1;
frm.action="[确认定单的页面]";
}
function doCancel(){
var frm=document.form1;
frm.action="[撤消定单的页面]";
}
</script>
至于原始<form>中的action属性可以保留为空或一个默认的地址。
第2个回答 2013-07-04
按钮动作不一定是提交表单,如:
<input type="submit" name="button" id="button" value="提交" />
<input type="button" name="button2" id="button2" value="按钮"/>
前者的作用是提交表单,点击后提交到form的action属性指定的处理页面上
后者必须人为地指定动作,否则没有意义,因此可以加上:
onclick="window.location.href='xxx.htm'"
点击后转到xxx.htm本回答被网友采纳
第3个回答 推荐于2016-02-08
需要两个文件,
index.asp
<body>
<!--这里的 P.ASP 可以改成自已需要的页面,必须要和 index.asp 放在同一个目录-->
<form id="form1" name="form1" method="post" action="p.asp">
<label for="username">姓名:</label>
<input type="text" name="username" id="username" />
<input type="submit" name="button" id="button" value="提交" />
</form>
</body>
</html>
p.asp
<%
response.write request("username")
%>
第4个回答 2013-07-04
一般好像没有撤销订单的。
所以应该为:
<form name="form1" method="post" action="执行订单的页面.asp">
<label>
<input type="submit" name="Submit" value="确认订单">
</label>
</form>