日期:2014-05-16 浏览次数:20416 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<script>
function chekName(){
var name=document.getElementById("textfield").value;
var pass=document.getElementById("textfield2").value;
if(name==""){
document.getElementById("tishizhanghao").innerHTML="账号不能为空";
}
}
</script>
<table width="444" height="212" border="1">
<tr>
<td width="65">账号</td>
<td width="168"><form id="form1" name="form1" method="post" action="">
<label>
<input type="text" name="textfield" onblur="chekName()" />
</label>
</form> </td>
<td width="189"><span id="tishizhanghao"></span></td>
</tr>
<tr>
<td>密码</td>
<td><form id="form2" name="form2" method="post" action="">
<label>
<input type="text" name="textfield2" />
</label>
</form> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><form id="form3" name="form3" method="post" action="">
<label>
<input type="submit" name="Submit" value="提交" />
</label>
<label>
<input type="submit" name="Submit2" value="重置" />
</label>
</form> </td>
<td> </td>