Script Categories













Background Effects >>> Type A Color.

Visitors just type their favorite color in the box and click a button. The background is instantly changed to their favorite color!

Please enter your favorite color and then click the button.

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
function test(form) {
if (form.text.value == "")
alert("What\'s your favorite color?")
else {
document.bgColor=(""+form.text.value+"");
   }
}
// End -->
</script>
<center>
<FORM>
<B>Please enter your favorite
color and then click the button.
<BR></b>
<input type="text" name="text">
<input
type="button" name="button" value="Click for color!" onClick="test(this.form)">
</FORM>
</center>

Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).




©