<style type="text/css">
form label.hide {
display: none;
}
</style>
<script type="text/javascript">
function sendForm( self ) {
var hasSend = true;
for( var i = 0; i < self.length; i++ ) {
if ( self[i].value ) {
self[i].parentNode.className = "hide";
} else {
self[i].parentNode.className = "";
self[i].focus();
hasSend = false;
break;
}
}
return hasSend;
}
</script>
<form action="" method="post" onsubmit="return sendForm( this );">
<label>Login: <input type="text" name="login" /></label>
<label class="hide">Password: <input type="password" name="password" /></label>
</form>