|
@@ -7,8 +7,9 @@
|
|
|
<title>A-Level</title>
|
|
|
</head>
|
|
|
<body>
|
|
|
- <script>
|
|
|
-
|
|
|
+
|
|
|
+ <script>
|
|
|
+ // <!-- Password,LoginForm -->
|
|
|
function Password(parent, open){
|
|
|
const pass = document.createElement('input')
|
|
|
const btn = document.createElement('button')
|
|
@@ -51,9 +52,55 @@ this.open = open
|
|
|
}
|
|
|
return render()
|
|
|
}
|
|
|
-
|
|
|
let p = new Password(document.body, false)
|
|
|
|
|
|
+// Password Verify
|
|
|
+
|
|
|
+// function Password(parent,open){
|
|
|
+// const pass1 = document.createElement('input')
|
|
|
+// const pass2 = document.createElement('input')
|
|
|
+// const btn = document.createElement('button')
|
|
|
+// pass1.placeholder = 'password 1'
|
|
|
+// pass2.placeholder = 'password 2'
|
|
|
+// pass2.id = 'pass2'
|
|
|
+// btn.innerText = 'Submit'
|
|
|
+// btn.id = "btn"
|
|
|
+// document.body.prepend(btn)
|
|
|
+// document.body.prepend(pass2)
|
|
|
+// document.body.prepend(pass1)
|
|
|
+// btn.addEventListener('click', () => this.setOpen(!this.open))
|
|
|
+// this.open = open
|
|
|
+// this .setOpen = (value) => {
|
|
|
+// this.open = value
|
|
|
+// render()
|
|
|
+// }
|
|
|
+// this.getOpen = () => {
|
|
|
+// return this.open
|
|
|
+// }
|
|
|
+
|
|
|
+// document.getElementById('btn')
|
|
|
+// .onclick = () => {
|
|
|
+// document.getElementById('pass2').style.display = 'none';
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+// oninput = () =>{
|
|
|
+// if(pass1.value !== pass2.value){
|
|
|
+// btn.setAttribute('disabled', true)
|
|
|
+// }
|
|
|
+// else{
|
|
|
+// btn.removeAttribute('disabled')
|
|
|
+// }
|
|
|
+
|
|
|
+// }
|
|
|
+// const render = () => {
|
|
|
+// pass1.setAttribute('type', `${this.open ? 'text' : 'password'}`);
|
|
|
+// pass2.setAttribute('type', `${this.open ? 'text' : 'password'}` );
|
|
|
+// }
|
|
|
+// return render()
|
|
|
+// }
|
|
|
+// let p = new Password(document.body, false)
|
|
|
+
|
|
|
</script>
|
|
|
</body>
|
|
|
</html>
|