Change Body Backgroud Color By Textbox Using HTML

How To Change HTML Body Color By Using Textbox

Today i am going to tell you a very simple and usefull HTML TRICK, In this article we will learn how to change Body Background color by Fill Color Name in Text Box.

First Of All you have to create a html file and paste this html code….

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<body onkeyup=document.bgColor=document.fname.color.value>
   <form name="fname">
      <input type="text" name="color" />

Now Save the file and run it in your Browser and Fill The Color Name in Text Box..and see magic..

Fill Orange Color in Textbox
Fill Pink Color in Textbox

Leave a Reply

Notify of