标签:密码 var 方法 com charset 验证用户名 body es2017 blog
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>yixiao</title> </head> <body> <p>你好</p> <script> docament.write(Date()) </script> <button type="button" onclick=window.alert("弹出对话框")>login</button> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>登录</title> <script> </script> <script>function fnLogin() { var oUname=document.getElementById("uname") var oUpass=document.getElementById("upass") var oError=document.getElementById("error_box") if(olname.value.length<6){ oError.innerHTML="用户名至少6 位" } } } </script> </head> <body> <div class="box"> <h2>join</h2> <div class="input-box"> 用户名:<input id="uname" type="text" placeholder="用户名"> </div> <div class="input-box"> 密码:<input id="upass"type="password" placeholder="密码"> </div> <div id="error-box"><br></div> <div id="error_box"><br></div> <div class="input_box"> <button onclick="fnLogin()">登陆</button> </div> </div> </body> </html>
标签:密码 var 方法 com charset 验证用户名 body es2017 blog
原文地址:http://www.cnblogs.com/caoxinwen092/p/7722753.html