xgqfrms / HTML5

HTML 5 :heart: :rocket: 🎅 ❄ 🎄 🎁 🔀 ⛄ 🔔
https://html5.xgqfrms.xyz
7 stars 14 forks source link

input & invalid #18

Open xgqfrms opened 4 years ago

xgqfrms commented 4 years ago

input invalid css disabled sibling

https://stackoverflow.com/questions/49194701/applying-css-to-element-when-sibling-input-is-disabled

xgqfrms commented 4 years ago

https://developer.mozilla.org/en-US/docs/Web/CSS/:disabled

https://developer.mozilla.org/en-US/docs/Web/CSS/Adjacent_sibling_combinator

xgqfrms commented 4 years ago

email name bug

image

https://codepen.io/webgeeker/pen/KKwPMRm


        <section id="section1">
           <form action="https://www.freecodecamp.com/email-submit" id="form">
               <label for="email">email address</label>
                <input
                    type="email"
                    name="email"
                    id="email"
                    placeholder="please input your email address"
                    aria-placeholder="please input your email address"
                    required
                    autocomplete
                />
<!--                 <input
                    type="email"
                    name="email-field"
                    id="email"
                    placeholder="please input your email address"
                    aria-placeholder="please input your email address"
                    required
                    autocomplete
                /> -->
                <input type="submit" id="submit" value="login">
                <!-- https://www.freecodecamp.com/email-submit -->
           </form>
        </section>
xgqfrms commented 4 years ago

https://github.com/xgqfrms/learn-freecodecamp

xgqfrms commented 4 years ago

input & email & pattern

pattern="^([\w!.%+\-])+@([\w\-])+(?:\.[\w\-]+)+$"

<input autocomplete="off" spm="/havanaguc.1.02" code="H46866778" class="form-text form-text-email err-input" name="email" id="J_Email" type="text" maxlength="60" value="" placeholder="请输入邮箱" required="" pattern="^([\w!.%+\-])+@([\w\-])+(?:\.[\w\-]+)+$" pattern-msg="邮箱格式不正确,请重新输入" required-msg="请输入邮箱" data-spm-anchor-id="a2145.520000001.0.i1.7e2816be3esiES">

https://account.alibabacloud.com/register/intl_register.htm

https://regexper.com/

image

https://regexper.com/#%5E%28%5B%5Cw!.%25%2B%5C-%5D%29%2B%40%28%5B%5Cw%5C-%5D%29%2B%28%3F%3A%5C.%5B%5Cw%5C-%5D%2B%29%2B%24