日期:2014-05-16  浏览次数:20990 次

为什么 运行到这里时document.getElementById("indicator").style.display="block";显示是缺少对象的 ??
本帖最后由 showbo 于 2012-10-24 21:19:18 编辑
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC"-//W3C//DTC HTML 4.01 Transitional//EN">
<html>
<head>
          <script type='text/javascript' src='<%=path %>/dwr/interface/loginService.js'></script>
          <script type='text/javascript' src='<%=path %>/dwr/engine.js'></script>
          <script type='text/javascript' src='<%=path %>/dwr/util.js'></script>
        
          <script language="javascript">
          function check1()
          {
               if(document.ThisForm.userName.value=="")
               {
                    alert("请输入用户名");
                    document.ThisForm.userName.focus();
                    return false;
               }
               if(document.ThisForm.userPw.value="")
               {
                alert("请输入密码");
                return false;
                }
                document.getElementById("indicator").style.display="block";
                loginService.login(document.ThisForm.userName.value,document.ThisForm.userPw.value,0,callback);
                }
                function callback(data)
                {
                     document.getElementById("indicator").style.display="none";
                 if(data=="no")
                {
                     alert("用户名或密