发新话题
打印

<html:form>标签中的action带参问题

<html:form>标签中的action带参问题

<html:form  action="/testAction.do?search=search&expression=NULL"  method="post">
      请输入要查找的 name : <html:text property="name" />
      <html:submit  property='action' ><bean:message key='button.search'/></html:submit>
      <html:reset value="重写" />
  </html:form>
<html:form action="testAction.do?expression=NULL" method="post">
      <html:submit  property='action' ><bean:message key='button.showall'/></html:submit>
  </html:form>

请问在上面的两个表单中:search=search&expression=NULL和expression=NULL"表示什么.而且在提交表单之后.actionBean中又是如何调用相应的方法

TOP

上面的参数应当是GET的方式提交上去的,HTML里有GET和POST的方法,form里的是POST的数据,action里的是GET的数据。
如果 method="GET",则action里的参数无效,只取form里面的变量为GET值。
换个头像,看见广告就眼红,直接封ID。

TOP

发新话题