[Solved] How to check what tag says for a password


I have also wanted to make login page.

1) For the input I want to trigger an event function to check if password is right so I say

<input type = "password" id = "passwordInput"></input>
<button onclick = "myfunction()">Submit</button>

2) Now that I have the onclick, I need to make my function

    function myfunction() {
        var pass = document.getElementById("passwordInput"); 

        //this returns the value of input
    }

3) I now need to check if the password is right so I add this to myfunction()

    if(pass.value == "correct password") {
       alert("You have logged successfully")
    }

One good website to find out how to make a login page is
https://getcodingkids.com/code-skill/create-a-password/

5

solved How to check what tag says for a password