I think this could be put at Web Design part, but maybe the JavaScript is more important
I am reposting this at Web Design
I posted it at JavaScript Forum, that was a mistake
Code:
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
<!--
Simple Login Form
** Used with jQuery
-->
<form id='login'>
<input type='text' placeholder='username' id='login_name' />
<input type='password' placeholder='password' id='login_pwd' />
<input type='submit' value='Login' />
</form>
<script>
var logins = [
['login', 'pwd']
];
$('#login').submit(function(e) {
e.preventDefault();
for(login in logins) {
if($('#login_name').val() == login[0] && $('#login_pwd').val() == login[1]) {
loginSuccess();
}
}
});
function loginSuccess() {
// If successfully logged in this function will be called
// Run some function here
}
</script>
Demo: JSBIN