Nowadays trying to learn java scripts for designing web pages.Spent the whole day learning them and finally got some working here is the script just copy it and paste it in notepad and save it with .html extension.Open it with any browser and see the magic.
script
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function changecolor(code){
document.bgColor=code
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<input type="button" name="Button1" value="RED" onclick="changecolor('red')">
<input type="button" name="Button2" value="BLUE" onclick="changecolor('blue')">
<input type="button" name="Button3" value="GREEN" onclick="changecolor('green')">
<input type="button" name="Button4" value="ORANGE" onclick="changecolor('orange')">
</FORM>
</BODY>
</HTML>