Menu
This is how the code looks:
<P align=center>
<form name=”color_form”>
<input type=”text” name=”color_of_bg” onChange=”chngBgColor(window.document.color_form.color_of_bg.value)” size=”20″>
</form>
</P>
Here’s the function:
//Function to change background color
function chngBgColor(the_new_color)
{
window.document.bgColor = the_new_color;
}
When I use this on a webpage, it doesn’t work. Anybody know why?
I want it to change the background color to something close to the name the visitor types in the text box without the visitor having to click a button.