THE XHTML PROGRAM ILLUSTRATE CHANGING BACKGROUND AND FOREGROUND COLOUR DYNAMICALYY

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>changing color </title>
<script type="text/javascript" src="changecolor.js">
</script>
</head>
<body>
<p style="font-family:times; font-style=static;font-size=16pt;"> welcome to DSDNP </p>
<form action=" ">
<p>
Background color:<input type="text" id="bg" onchange="setbackcolor(this.value);" /> <br />
Foreground color:<input type="text" id="fg" onchange="setforecolor(this.value);" /> <br />
</p>
</form>
</body>
</html>




Changecolor.js
 function setbackcolor(bcolor)
{
document.body.style.backgroundColor=bcolor;
}

function setforecolor(fcolor)
{
document.body.style.Color=fcolor;
}