wuheng 2 lat temu
rodzic
commit
24d47c1094
3 zmienionych plików z 175 dodań i 0 usunięć
  1. BIN
      day07/JavaScript-day07.pdf
  2. 37 0
      day07/web/regexp.html
  3. 138 0
      day07/web/register.css

BIN
day07/JavaScript-day07.pdf


+ 37 - 0
day07/web/regexp.html

@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+
+    <script>
+        const str = "1336661357"
+        const tel = /[0-9]{11}/
+        var b = tel.test( tel );
+        //console.log( b )
+
+        /**
+         * . 匹配所有
+         * * 零位或者多为
+         * + 一次以上
+         * [] 范围匹配
+         * () 子匹配
+         * ^ 以某某开头
+         * $ 以某某结尾
+         * ? 可有可没有 懒汉模式
+         * {} 匹配次数
+         */
+
+        const strEmail = "admin@80boys.com"
+        const email = /\w{3,20}@\w{3,20}\.\w{3,20}/
+        console.log( email.test( strEmail ) )
+
+        const emailreg = new RegExp("\\w{3,20}@\\w{3,20}\\.\\w{3,20}")
+        console.log( emailreg.test( strEmail ) )
+
+    </script>
+
+</body>
+</html>

+ 138 - 0
day07/web/register.css

@@ -0,0 +1,138 @@
+* {
+    margin: 0;
+    padding: 0;
+    list-style-type: none;
+}
+.reg-content{
+    padding: 30px;
+    margin: 3px;
+}
+a, img {
+    border: 0;
+}
+
+body {
+    background-image: url("../imgs/reg_bg_min.jpg") ;
+    text-align: center;
+}
+
+table {
+    border-collapse: collapse;
+    border-spacing: 0;
+}
+
+td, th {
+    padding: 0;
+    height: 90px;
+
+}
+.inputs{
+    vertical-align: top;
+}
+
+.clear {
+    clear: both;
+}
+
+.clear:before, .clear:after {
+    content: "";
+    display: table;
+}
+
+.clear:after {
+    clear: both;
+}
+
+.form-div {
+    background-color: rgba(255, 255, 255, 0.27);
+    border-radius: 10px;
+    border: 1px solid #aaa;
+    width: 424px;
+    margin-top: 150px;
+    margin-left:1050px;
+    padding: 30px 0 20px 0px;
+    font-size: 16px;
+    box-shadow: inset 0px 0px 10px rgba(255, 255, 255, 0.5), 0px 0px 15px rgba(75, 75, 75, 0.3);
+    text-align: left;
+}
+
+.form-div input[type="text"], .form-div input[type="password"], .form-div input[type="email"] {
+    width: 268px;
+    margin: 10px;
+    line-height: 20px;
+    font-size: 16px;
+}
+
+.form-div input[type="checkbox"] {
+    margin: 20px 0 20px 10px;
+}
+
+.form-div input[type="button"], .form-div input[type="submit"] {
+    margin: 10px 20px 0 0;
+}
+
+.form-div table {
+    margin: 0 auto;
+    text-align: right;
+    color: rgba(64, 64, 64, 1.00);
+}
+
+.form-div table img {
+    vertical-align: middle;
+    margin: 0 0 5px 0;
+}
+
+.footer {
+    color: rgba(64, 64, 64, 1.00);
+    font-size: 12px;
+    margin-top: 30px;
+}
+
+.form-div .buttons {
+    float: right;
+}
+
+input[type="text"], input[type="password"], input[type="email"] {
+    border-radius: 8px;
+    box-shadow: inset 0 2px 5px #eee;
+    padding: 10px;
+    border: 1px solid #D4D4D4;
+    color: #333333;
+    margin-top: 5px;
+}
+
+input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
+    border: 1px solid #50afeb;
+    outline: none;
+}
+
+input[type="button"], input[type="submit"] {
+    padding: 7px 15px;
+    background-color: #3c6db0;
+    text-align: center;
+    border-radius: 5px;
+    overflow: hidden;
+    min-width: 80px;
+    border: none;
+    color: #FFF;
+    box-shadow: 1px 1px 1px rgba(75, 75, 75, 0.3);
+}
+
+input[type="button"]:hover, input[type="submit"]:hover {
+    background-color: #5a88c8;
+}
+
+input[type="button"]:active, input[type="submit"]:active {
+    background-color: #5a88c8;
+}
+.err_msg{
+    color: red;
+    padding-right: 170px;
+}
+#password_err,#tel_err{
+    padding-right: 195px;
+}
+
+#reg_btn{
+    margin-right:50px; width: 285px; height: 45px; margin-top:20px;
+}