parent
f105b8dcc0
commit
811d41aa3d
1 changed files with 5 additions and 5 deletions
|
@ -9,11 +9,11 @@
|
|||
<h1>Sign-up</h1>
|
||||
<form id="register">
|
||||
<label for="user">Username</label>
|
||||
<input type="text" id="user" name="user" /> <br />
|
||||
<input type="text" id="user" name="user"/> <br/>
|
||||
<label for="pass">Password</label>
|
||||
<input type="password" id="pass" name="pass" /> <br />
|
||||
<input type="password" id="pass" name="pass"/> <br/>
|
||||
<label for="confirm">Confirm</label>
|
||||
<input type="password" id="confirm" name="confirm" />
|
||||
<input type="password" id="confirm" name="confirm"/>
|
||||
<input type="Submit" value="Submit"/>
|
||||
</form>
|
||||
<p id="formStatus"></p>
|
||||
|
@ -24,11 +24,11 @@
|
|||
const formEl = document.getElementById("register");
|
||||
formEl.addEventListener('submit', (listener) => formHandler(listener));
|
||||
|
||||
function formHandler(listener){
|
||||
function formHandler(listener) {
|
||||
listener.preventDefault();
|
||||
const formData = new FormData(formEl);
|
||||
const pass = formData.get("pass");
|
||||
if(pass === formData.get("confirm")) {
|
||||
if (pass === formData.get("confirm")) {
|
||||
const url = new URL(window.location.href);
|
||||
const urlParam = new URLSearchParams(url.search);
|
||||
const auth = urlParam.get("auth");
|
||||
|
|
Loading…
Reference in a new issue