Here is the code that allows you to do this:
Code:
<html>
<! - Author: HackTrack ->
<head>
Demo <title> selection background color </ title>
<script language="javascript" type="text/javascript">
changeBackgroundColor function (elm) {
window.status = elm.style.backgroundColor;
document.body.style.backgroundColor = elm.style.backgroundColor;
}
</ Script>
<style>
table, tr, td {
margin: 0px;
padding: 0px;
border: solid 1px # 0f0f0f;
}
div {
width: 50px;
height: 50px;
}
</ Style>
</ Head>
<body>
<table>
<tr>
<th colspan="4"> Choose the background color </ th>
</ Tr>
<tr>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #000000;"> </ div> </ td>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #111111;"> </ div> </ td>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #222222;"> </ div> </ td>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #333333;"> </ div> </ td>
</ Tr>
<tr>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #444444;"> </ div> </ td>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #555555;"> </ div> </ td>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #666666;"> </ div> </ td>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #777777;"> </ div> </ td>
</ Tr>
<tr>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #888888;"> </ div> </ td>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #999999;"> </ div> </ td>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #aaaaaa;"> </ div> </ td>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #bbbbbb;"> </ div> </ td>
</ Tr>
<tr>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #cccccc;"> </ div> </ td>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #dddddd;"> </ div> </ td>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #eeeeee;"> </ div> </ td>
<td> <div onclick="javascript: changeBackgroundColor(this);" style="background-color: #ffffff;"> </ div> </ td>
</ Tr>
</ Table>
</ Body>
</ Html>
Bookmarks