I know i'm doing this totally wrong, i've tried a 100 times but i can't get it! whats wrong with this code?
i want the background to be changed using the form:
<html>
<head>
<title>
Background Color Changer
</title>
<script language="JavaScript">
<!-- Beginning of JavaScript -
function SetBGColor(mycolor) {
document.bgcolor = mycolor;
}
// - End of JavaScript - -->
</script>
</head>
<body>
<form>
Pick a COLOR!
<input type=radio name=choice value="red">Red
<input type=radio name=choice value="blue">Blue
<input type=radio name=choice value="black">Black
<input type=radio name=choice value="white">White
<input type=button value="Change it!"
onClick="javascript:SetBGColor(choice.value);">
</form>
</body>
</html>
i want the background to be changed using the form:
<html>
<head>
<title>
Background Color Changer
</title>
<script language="JavaScript">
<!-- Beginning of JavaScript -
function SetBGColor(mycolor) {
document.bgcolor = mycolor;
}
// - End of JavaScript - -->
</script>
</head>
<body>
<form>
Pick a COLOR!
<input type=radio name=choice value="red">Red
<input type=radio name=choice value="blue">Blue
<input type=radio name=choice value="black">Black
<input type=radio name=choice value="white">White
<input type=button value="Change it!"
onClick="javascript:SetBGColor(choice.value);">
</form>
</body>
</html>