| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1136 人关注过本帖
标题:哪位师傅看看问题出在哪谢谢!
取消只看楼主 加入收藏
暮色苍鹰
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-7-14
收藏
 问题点数:0 回复次数:0 
哪位师傅看看问题出在哪谢谢!
当student和pwd文本框为空时不显示alert中的内容




<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE6 {
    font-size: 36px;
    font-style: italic;
    color: #FF0000;
}
-->
</style>
<script language="javascript">
function check()
{
  if(document.form1.student.value=="")
   {alert("请输入用户名");
    document.form1.student.focus();
    return false;}
  if(docuemnt.form1.pwd.value=="")
   {alert("请输入用户密码");
   document.form1.pwd.focus();
   return false;}
   document.form1.ctype.value="add";
   document.form1.submit();
   }</script>
</head>

<body>
<table align="center" width="758" height="152" border="0">
<tr>
  <td width="736" height="100%" bgcolor="#33FF33"><div align="center" class="STYLE6">在线考试系统 </div></td>
  </tr>
</table>

<table  width="734" border="0" align="center" cellpadding="4" bordercolor="#1111111" style="border-collapse:collapse; position:absolute; left: 258px; top: 182px;">
  <tr>
    <td height="249"><form id="form1" name="form1" method="post" action="">
    <input type="hidden" name="ctype"  />
      <table width="745" border="0" height="247">
        <tr>
          <td width="8">&nbsp;</td>
          <td width="359"><table width="100%" border="0" style="border-collapse:collapse" bordercolor="#111111" cellpadding="5" cellspacing="0"  >
            <tr>
              <td width="21%"><div align="center">用户名</div></td>
              <td colspan="2"><label>
                <input type="text" name="student" />
              </label></td>
              <td width="18%">&nbsp;</td>
            </tr>
            <tr>
              <td><div align="center">密码</div></td>
              <td colspan="2"><label>
                <input type="text" name="pwd" />
              </label></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td width="23%"><label>
                <input type="button" onclick="check()" name="Submit" value="提交" >
              </label></td>
              <td width="38%"><label>
                <input type="submit" name="Submit2" value="重置" />
              </label></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td colspan="2"><a href="register.asp" >新学生注册</a></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td colspan="2"><p><a href="admin/index.asp">后台管理程序入</a></p>                </td>
              <td>&nbsp;</td>
            </tr>
          </table>
            <p>&nbsp;</p></td>
          <td width="356"><p>&nbsp;</p>
            <p align="center"><img src="gif/晚霞.jpg" width="139" height="104" /></p></td>
        </tr>
      </table>
        </form>
    </td>
  </tr>
</table>



</body>
</html>
搜索更多相关主题的帖子: 师傅 DTD title text 
2008-07-14 15:00
快速回复:哪位师傅看看问题出在哪谢谢!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017368 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved