效果图如图
直接上代码
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<form action="http://www.baidu.com" method="post">
<table>
<tr>
<td>Login</td>
<td><input type="text" name="username" id="username"></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="password" id="password"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" onclick="return check()"></td>
</tr>
</table>
</form>
</body>
<script type="text/javascript