This Javascript function helps you to change background color of the web page or html table.
Features
a) This javascript color changer is used dynamically to change the color of background.
b) You can also change the background color of the html table.
c) You can select color from color palette.
Preview
Preview to change bgcolor of HTML Table:
Preview to change background color of the web page Demo
For customization of this script or any script development, contact us at support@hscripts.com
Usage
a) Copy the above code into your file.
b) Use the following function, inorder to view background color change for a table.
function clicked(gg,rr,bb)
{
var hex='#'+deciToHex(gg)+deciToHex(rr)+deciToHex(bb);
document.getElementById('tbprev').style.backgroundColor=hex;
}
c) Set the table-id as 'tbprev' inorder to change the background color for a table.
d) Use the following function, inorder to view background color change for a page.
function clicked(gg,rr,bb)
{
var hex='#'+deciToHex(gg)+deciToHex(rr)+deciToHex(bb);
document.body.style.backgroundColor=hex;
}
e) You can use any of the above function to view background-color change.
License
- The javascript (misspelled as java script) is given under GPL License
- i.e. Free use for those who use the codes as it is.
- Free, if your modification does not remove our copyright information and links.
- Click Here for detailed license information.
- You can purchase the script if your requirements does not meet our GPL License terms.