问题,
<form method="post" name="UserForm" action="user.do">
    <input type="text" name="username" />
    <input type="password" name="password" />

</form>
用的formbean接收值
请求时http://localhost:8080/user.do?op=toAdd现在我直接想写URL把值这样传给action请问怎么写?
http://localhost:8080/user.do?op=toAdd后面跟值应该怎么写

解决方案 »

  1.   

    http://localhost:8080/user.do?op=toAdd&para=123&we=345
      

  2.   

    前提是你的Input要有id属性
      <input id="username" type="text" name="username" />
      <input id="password" type="password" name="password" />
    http://localhost:8080/user.do?op=toAdd&username=***&password=***
    而且不知道你这里的URL如你所写是否能够使用,完整的URL应该为
    http://localhost:8080/[项目名称]/user.do?op=toAdd&username=***&password=***