Movatterモバイル変換


[0]ホーム

URL:


x-password

A password input natively enhanced via a Custom Element (Web Component).

It adds the ability to toggle visibility and validation to confirm it matches the value of another field

Demo

Check it live.

Usage

<scriptsrc="https://tobz-nz.github.io/x-password/x-password.js"type="module"></script><formonsubmit="return false"><labelfor="password">Password</label><inputtype="password"name="password"id="password"><br><labelfor="password_confirm">Confirm Password</label><inputis="x-password"name="password_confirm"id="password_confirm"confirm-target="password"><buttontype="button"onclick="document.getElementById('password_confirm').toggleAttribute('visible')">Toggle Visibility</button><br><button>Go</button></form>

Options

AttributeOptionsDefaultDescription
visible-nullSet the value to visible (plain text)
confirm-targetstringnullThe ID of another field to match

History

License

MIT License


[8]ページ先頭

©2009-2025 Movatter.jp