81,090
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>New Web Project</title>
<script type='text/javascript'>
function testSubmit(){
var url="test.jsp?uname=admin&upass=admin";
var form=document.getElementById("myForm");
form.action=url;
form.submit();
}
</script>
</head>
<body>
<form id="myForm" method="post">
<input type="button" value="submit" onclick="testSubmit()">
</form>
</body>
</html>
<form action="<%=request.getContextPath() %>/loginAction.do" method="post">
<fieldset><legend>manager login</legend>
<table>
<tr>
<th><label>username:</label></th>
<td><input name="username" type="text" /></td>
</tr>
<tr>
<th><label>password:</label></th>
<td><input name="password" type="password" /></td>
</tr>
<tr>
<td><button type="submit" >Login</button></td>
<td><button type="submit" >Cancel</button></td>
</tr>
</table>
</fieldset>
</form>