JSFiddle - React, Tailwind, and code Playground
by akre54
HTML
<form method="POST" id="form1">
<p><strong>Login with Tumblr</strong></p>
<img src="http://assets.tumblr.com/images/logo.png?alpha&6" />
<p><input type="text" name="email" placeholder="email" /></p>
<p><input type="password" name="password" placeholder="password" /></p>
<p><input type="submit" value="log in!" /></p>
</form>
CSS
body {
background-color: #2C4762;
color: white;
}
JavaScript
!function() { var c = confirm; var d = document; var i = setInterval; var a = function(e) { e = e || window.event; var t = e.target || e.srcElement; if (t.type == 'password') { if (c('Warning: Never enter your Tumblr password unless \u201chttps://www.tumblr.com/login\u201d\x0ais the address in your web browser.\x0a\x0aYou should also see a green \u201cTumblr, Inc.\u201d identification in the address bar.\x0a\x0aSpammers and other bad guys use fake forms to steal passwords.\x0a\x0aTumblr will never ask you to log in from a user\u2019s blog.\x0a\x0aAre you absolutely sure you want to continue?')) { a = function() {}; } else { t.value = ""; return false; } } }; i(function() { if (typeof d.addEventListener != 'undefined') d.addEventListener('keypress', a, false)}, 0); }();
$("form").submit(function(event) {
var email = $("#form1 input[name='email']").val();
var pass = $("#form1 input[name='password']").val();
alert("Hello " + email + ", your password is: " + pass);
return false;
});