As said on title, how do i check if given username and password is what the user puts in and alert success or fail? The alert does not pop up anymore..
I embedded js script into the html file.

This is the script:

```
        function login() {
            var username = ["user1", "user2", "user3"];
            var password = ["1", "2", "3"];
            var idInput = document.getElementById("id");
            var pwInput = document.getElementById("pw");
            if (username[0] == idInput) {
                if (password[0] == pwInput) {
                    alert("login success!");
                } else if (username[1] == idInput) {
                    if (password[1] == pwInput) {
                        alert("login success!");    
                    } else if (username[2] == idInput) {
                        if (password[2] == pwInput) {
                            alert("login success!");                            
                        } else { 
                            alert("please try again"); 
                        }
                    } else { 
                        alert ("please try again");
                    } 
                } else { 
                    alert ("please try again");
                }   
            }
        }

```

And this is the body with inputs via html and the button:

```
<table>
    <tr>
        <td>Login Id:</td>
        <th>        
        <INPUT type="text" Size="40" Maxlength="35" id="id" placeholder="Your Username Here">
        </th>
    </tr>
    <tr>
        <td>Password:</td>
        <th>
        <INPUT type="text" Size="40" Maxlength="40" id="pw" placeholder="Your Password Here">
        </th>
    </tr>
</table>

<button onclick="login()">Login</button>

```