首页 > 其他分享 >直播app开发搭建,注册时确定两次密码一致

直播app开发搭建,注册时确定两次密码一致

时间:2022-12-16 14:11:25浏览次数:45  
标签:app 两次 密码 getElementById 直播 document 搭建

直播app开发搭建,注册时确定两次密码一致

1、verification.jsp

onblur 事件会在对象失去焦点时发生

 


<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<script type="text/javascript" src="../js/jquery02.js"></script>
<body>
<script>
    function verification() {
        var pw1 = document.getElementById("repassword").value;
        var pw2 = document.getElementById("password").value;
        if(pw1 == pw2) {
            document.getElementById("tishi").innerHTML="两次密码相同";
            document.getElementById("button").disabled = false;
        }
        else {
            document.getElementById("tishi").innerHTML="两次密码不相同";
            document.getElementById("button").disabled = true;
        }
    }
</script>
    <p id="tishi" style="color: red"></p>
    <p>账号:<input type="text" name="name"><br></p>
    <p>密码:<input type="text" id="password" onblur="verification()"><br></p>
    <p>确认:<input type="text" id="repassword" onblur="verification()"></p>
        <input id="button" type="submit"  value="提交">
</body>
</html>

以上就是直播app开发搭建,注册时确定两次密码一致, 更多内容欢迎关注之后的文章 

 

标签:app,两次,密码,getElementById,直播,document,搭建
From: https://www.cnblogs.com/yunbaomengnan/p/16987234.html

相关文章