为什么在没加<form></form>时,js可以提示错误,加了<form></form>之后,就不能提示了。
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content...
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="login.css" />
<script type="text/javascript" src="login.js" ></script>
<title>登陆</title>
</head>
<body onload="number()"><div class="title">
信息交流平台
</div>
<div class="fontmain spacing">
首页 | 登陆 | 注册
</div>
<div class="blank spacing layout">
</div>
<div class="left spacing fontmain">
<form action="a.asp">
<table>
<tr>
<td class="tdleft"> 用户名</td>
<td><input type="text" class="input" name="username" onblur="showusername()"></td>
</tr>
<tr>
<td class="tdleft"> 密码</td>
<td><input type="password" class="input" name="password" onblur="showpassword()"></td>
</tr>
<tr>
<td class="tdleft"> 用户类型</td>
<td><input type="radio" name="type" checked="checked"> 普通用户 <input type="radio" name="type"> 管理员</td>
</tr>
<tr>
<td class="tdleft"> 验证码</td>
<td><input type="text" class="inputother" name="identify" onblur="showidentify()"> <span id="ident"> </span>
</td>
</tr>
<tr>
<td class="tdleft" colspan="2"> <input type="submit" value="提交"> <input type="reset" value="取消"></td>
</tr>
</table>
</form>
</div>
<div>
<table class="right spacing fontmain">
<tr>
<td> <span id="usererror"> </span></td>
</tr>
<tr>
<td> <span id="passworderror"> </span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span id="identifyerror"> </span></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</div><div class="blank spacing layout">
</div>
<div class="fontmain layout spacing">
版权所有 © 2011
</div>
</body>
</html>
js的内容和css内容,放不下,回答的留下邮箱。。 展开
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="login.css" />
<script type="text/javascript" src="login.js" ></script>
<title>登陆</title>
</head>
<body onload="number()"><div class="title">
信息交流平台
</div>
<div class="fontmain spacing">
首页 | 登陆 | 注册
</div>
<div class="blank spacing layout">
</div>
<div class="left spacing fontmain">
<form action="a.asp">
<table>
<tr>
<td class="tdleft"> 用户名</td>
<td><input type="text" class="input" name="username" onblur="showusername()"></td>
</tr>
<tr>
<td class="tdleft"> 密码</td>
<td><input type="password" class="input" name="password" onblur="showpassword()"></td>
</tr>
<tr>
<td class="tdleft"> 用户类型</td>
<td><input type="radio" name="type" checked="checked"> 普通用户 <input type="radio" name="type"> 管理员</td>
</tr>
<tr>
<td class="tdleft"> 验证码</td>
<td><input type="text" class="inputother" name="identify" onblur="showidentify()"> <span id="ident"> </span>
</td>
</tr>
<tr>
<td class="tdleft" colspan="2"> <input type="submit" value="提交"> <input type="reset" value="取消"></td>
</tr>
</table>
</form>
</div>
<div>
<table class="right spacing fontmain">
<tr>
<td> <span id="usererror"> </span></td>
</tr>
<tr>
<td> <span id="passworderror"> </span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span id="identifyerror"> </span></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</div><div class="blank spacing layout">
</div>
<div class="fontmain layout spacing">
版权所有 © 2011
</div>
</body>
</html>
js的内容和css内容,放不下,回答的留下邮箱。。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询