日期:2014-05-17  浏览次数:20793 次

新人求解
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <base href="<%=basePath%>">
   
  <title>用户注册页面</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">  
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript">
function kkc(){
var biaodan=document.getElementById("biaodan");
var name=document.getElementById("name");
var password=document.getElementById("password");
if(name=null||"".equsls("name")){
alert("请输入用户名");
return false;
}
if(password==null||"".equals("password")){
  alert("请输入密码");
  return false;
}
  biaodan.submit();
}
</script>
  </head>
  
  <body>
  <H3 align=center><FONT size=7 face=楷体_GB2312>欢迎您注册本系统,感谢您的到来!</FONT></H3>
  <form action="cba" id="biaodan" name="biaodan" method="get">
  <input type="text" id="name" name="name" value="请输入用户名"/>
  <input type="text" id="password" name="password" value="请输入密码"/>
  <input type="button" id="button" name="button" onclick="kkc" value="点击确定"/>
  </form>
  </body>
</html>


怎么错了


------解决方案--------------------
onclick="javascript:kkc();"