<input id=txt1>
<input type=button value=css onclick="document.all.txt1.style.background='yellow';document.all.txt1.style.color='red'">
<input type=button value=css onclick="document.all.txt1.style.background='yellow';document.all.txt1.style.color='red'">
<input type=button onclick="ff()">
<script>
function ff()
{
obj = document.getElementById ("t1");
document.getElementById ("t1").className = 'xxx';
}
</script>