倒,楼主似乎走错地方了function checkValues()
{
var AccountID;
var AccountIDLength;
var Passw;
var PassLength;
var txtAccountID;
AccountID=document.form3.txtAccountID.value;
AccountIDLength=AccountID.lentgh;
Passw=document.form3.txtPass.value;
PassLength=passw.length;
if(AccountIDLength==0)
{
alert("You cannot login if you do not enter your login");
document.form3.txtAccountID.focus();
}
if(PassLength==0)
{
alert("You cannot login if you do not enter your password")
document.form3.txtPass.focus();
}
}
{
var AccountID;
var AccountIDLength;
var Passw;
var PassLength;
var txtAccountID;
AccountID=document.form3.txtAccountID.value;
AccountIDLength=AccountID.lentgh;
Passw=document.form3.txtPass.value;
PassLength=passw.length;
if(AccountIDLength==0)
{
alert("You cannot login if you do not enter your login");
document.form3.txtAccountID.focus();
}
if(PassLength==0)
{
alert("You cannot login if you do not enter your password")
document.form3.txtPass.focus();
}
}
解决方案 »
- spring3.1 mvc 注解 配置 多数据源 [求助]
- Java导出excel文件的验证问题
- 毕业设计中的一些代码看不懂,里面有运行效果图,麻烦大家帮帮忙!~~~
- Hibernate的实体类中为什么要写equals方法和hashcode方法--请各位高人指点
- 如何通过form里面的select控件向两个文本框传送内容。
- 小问题~~~~~~~~~~~~~~~~~~~~~~~~~
- 关于html中的form的action路径问题
- 一个关于框架结构的问题!!!
- 南京会JSP的朋友来看看.
- JdbcTemplate 利用Log4j 在控制台打印出SQL语句、参数
- 做jsp遇到问题了(html的),很简单的,散分了!!
- 一个简单问题-排序!
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Earnest Bank</title>
<style type="text/css">
<!--
.style1 {font-size: x-large}
-->
</style>
<link href="CSS/Level2_Times_Forms.css" rel="stylesheet" type="text/css">
<script language="javascript">
function checkValues()
{
if(document.form3.txtAccountID.value.length==0)
{
alert("You cannot login if you do not enter your login");
document.form3.texAccountID.focus();
}
if(document.form2.txtpass.value.length==0)
{
alert("You cannot login if you do not enter your password")
document.form2.txtpass.focus();
}
}
</script></head><body>
<div align="center" class="style1">
<p>Earnest Bank </p>
<p>Banking Online</p>
<div align="left">
<table width="600" border="1">
<tr>
<td width="120"> </td>
<td width="250">Login information </td>
<td width="71"> </td>
</tr>
<tr>
<td>AccountID </td>
<td><form name="form3" method="post" action="">
<input type="text" name="txtAccountID" value="">
</form></td>
<td> </td>
</tr>
<tr>
<td>Password</td>
<td><form name="form2" method="post" action="">
<input name="txtpass" type="password" value="">
</form></td>
<td><form name="form1" method="post" action="">
<input type="submit" name="Submit" onClick="checkValues()" value="Submit">
</form></td>
</tr>
</table>
</div>
<p align="left"> </p>
<p align="left"> </p>
</div>
</body>
</html>
这个要加分号 ;