<style>
.login_form {background-color: #EEE;}
.login_form_bgcolor {background-color: #29D;}
</style>
<form class="login_form" id="form">
<input onkeyup="changecolor()"/>
</form>
<script>
function changecolor(){
document.getElementById('form').className = 'login_form_bgcolor';
}
</script>