<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<script type="text/javascript">
function checkForm(myform){
var id = myform.id.value;
var password = myform.password.value;
if(id == "") {
alert("名不能为空!");
myform.id.focus();
return false;
}
if(password == "") {
alert("姓不能为空!");
myform.password.focus();
return false;
}
return true;
}
</script>
<table>
<tr><td><img src="note.jpg"></img></td></tr>
</table>
<form action="login_conf.jsp" method="post" name="form1" onsubmit="return checkForm(this);">
<table width=50% align=center>
<tr>
<td colspan=2 align=center>登陆表列</td>
</tr>
<tr align=center>
<td>用户名</td>
<td><input type="text" name="id"></td>
</tr>
<tr align=center>
<td>密 码</td>
<td><input type="password" name="password"></td>
</tr>
<tr align=center>
<td colspan=2>
<input type="submit" value="登陆">
<input type="reset" values="重置">
</td>
</tr>
</table>
</form>
<script type="text/javascript">
function checkForm(myform){
var id = myform.id.value;
var password = myform.password.value;
if(id == "") {
alert("名不能为空!");
myform.id.focus();
return false;
}
if(password == "") {
alert("姓不能为空!");
myform.password.focus();
return false;
}
return true;
}
</script>
<table>
<tr><td><img src="note.jpg"></img></td></tr>
</table>
<form action="login_conf.jsp" method="post" name="form1" onsubmit="return checkForm(this);">
<table width=50% align=center>
<tr>
<td colspan=2 align=center>登陆表列</td>
</tr>
<tr align=center>
<td>用户名</td>
<td><input type="text" name="id"></td>
</tr>
<tr align=center>
<td>密 码</td>
<td><input type="password" name="password"></td>
</tr>
<tr align=center>
<td colspan=2>
<input type="submit" value="登陆">
<input type="reset" values="重置">
</td>
</tr>
</table>
</form>