-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Khayal39 edited this page Aug 29, 2022
·
1 revision
Welcome to the validation wiki!
UsernamePassword
<button id="submit" onclick="btnSave">Submit</button>
</form>
<div id="result"></div> -->
let name = document.getElementById('username'); let email = document.getElementById('email'); let password = document.getElementById('password'); let btnSave = document.getElementById('btnSave');
function User(username,email,password){
this.name = username;
this.email = email;
this.password = password;
this.getUserData = () => {
return ${this.username}
// return ${this.email}
// return ${this.password}
}
}
let UserData = () => { let data = new User(username.value,email.value,password.value); console.log(data);
}
btnSave.AddEventLisener("click", Data);