Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<style type="text/css">
/*<![CDATA[*/
.red {
background-Color:red;
}
/*]]>*/
</style>
<script type="text/javascript">
/*<![CDATA[*/
function Color(){
var args=Color.arguments,obj=args[0],z0=2;
for (;z0<args.length;z0+=2){
if (obj.value==args[z0]){
obj.style.backgroundColor=args[z0+1];
return;
}
}
obj.style.backgroundColor=args[1];
}
/*]]>*/
</script></head>
<body>
<input class="red" name="fred" onblur="Color(this,'red','3','green','4','blue');" onkeyup="Color(this,'red','3','green','4','blue');"/>
</body>
</html>
Bookmarks