coolComputer 2017-06-08 15:35 采纳率: 12.5%
浏览 1586

求大神看看一个超简单的网页代码

为什么这个我点击注册后没有效果呢?

 <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content = "text;html;charset=gbk">
<title>注册</title>
<script  language="javascript" type="">
    function LoginSubmit(){
        var name = document.Sign.name.value;
        var password = document.Sign.password.value;
        var enpass = document.Sign.Ensurepassword.value;
        if(name==null||name==""||password==null||password==""||enpass==null||enpass==""){
            alter("用户名或密码或确认密码不能为空!");
        }
        else if(password==enpass){
            alter("两次输入密码不一致请重新输入!");
        } else{
            document.Sign.submit();
        }
    }
</script>
<style type="text/css">
body{
background-image:url(ba.jpg); }
</style>

</head>

<body>
<form  method ="POST" name ="Sign" action="SignIn">
<p align = "left">用&nbsp;户&nbsp;名(必填):
<input type="text" name ="name" value="" size="20"></p>
<p allign = "left">密&nbsp;&nbsp;码(必填):
<input type="password" name="password" value="" size="20"></p>
<p align = "left">确认密码(必填):
<input type="password" name="Ensurepassword" value="" size="20"></p>
<p align = "left">性&nbsp;&nbsp;别&nbsp;:&nbsp;
<input type="text" name="sex" value="" size="20"></p>
<p align = "left">性&nbsp;&nbsp;别&nbsp;:&nbsp;
<input type="text" name="sex" value="" size="20"></p>
<p align = "left">住&nbsp;&nbsp;址&nbsp;:&nbsp;
<input type="text" name="address" value="" size="20"></p>
<p align = "left">联系电话:
<input type="text" name="tel" value="" size="20"></p>
<p align="left">
<input type="button" value="注册" name="sure" onclick="LoginSubmit()">
<input type="reset" value="重置" name="reset" >
</p>
</form>
</body>
</html>
  • 写回答

5条回答 默认 最新

  • threenewbee 2017-06-08 15:55
    关注

    alert你拼写错了。

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog