<form action="servlet" method="post"><input type="text" name="username" id="username" placeholder="请输入用户名"><input type=password" name="password" id="password" placeholder="请输入密码"><input type="submit" value="登录"></form>
好像见过这个问题,有几种方法: