JSFiddle - React, Tailwind, and code Playground
by Kamruz Jaman
HTML
Enter Password: <input type="password" id="pwd">
<input type="submit" id="submit" value="Submit">
JavaScript
$('#submit').on('click', function(e) {
e.preventDefault();
var password = $('#pwd').val();
if (password == 'pass1') {
window.top.location.href = "http://www.google.com";
} else if (password == 'pass2') {
window.top.location.href = "http://www.bing.com";
}
})