html from 不能提交

html-css08

html from 不能提交,第1张

form表单里要写action.

同时要有input标签,类型为submit

<form class="rounded" id="good-form" action="../account/refundQuery.do" method="post">

<img src="../Images/falali.jpg">

<h3>订单信息</h3>

<atext>

<a>退款订单号:12345</a></atext>

<atext>

<a>退款订单金额:1.11元(人民币)</a></atext>

<atext>

<a>退款订单时间:2013-08-01 11:14:07</a></atext>

<input type="submit" name="Submit" class="button" value="查询" />

</form>

这样的话,你有了form,aciton为跳转事件,你可以写成你要跳转的页面

你有了input,类型为submit,当你点击这个按钮时,就可以跳转了

form标签就是表单标签啊!

如果表单元素不放在这里, 那数据不会提交的!

当然, 现在html5中, 表单元素可以放在form标签之外了, 但form标签常规下是不能缺少的!

楼主说得是... jsp中的 应该设计到传值了吧

像楼上两位说得一点儿都不错 用js获取了以后 再通过ajax传值

或者就是提交form表单

<form method="post" action="ope.jsp">

<input type="text" name="username" />

<input type="password" name="pwd" />

<input type="submit" value="提交" />

</form>

这里 点提交以后 就会跳转到ope.jsp里面 在ope.jsp里面

<%

//根据前一个页面表单里的input的name属性来接收数据 赋值给String型的username

String username = request.getParameter("username")

//根据前一个页面表单里的input的name属性来接收数据 赋值给String型的pwd

String pwd = request.getParameter("pwd")

out.println("用户名:"+username)

out.println("<br />")

out.println("密码:"+pwd)

%>

这样 就可以把表单的数据接收过来 在第二个页面输出了的