<style type="text/css">
.code
{
font-family:Arial;
font-style:italic;
color:white;
border:0;
padding:2px 3px;
letter-spacing:3px;
font-weight:bolder;
width:40px;
height: 20px;
color:#FFFFFF;
text-align: center;
}
</style>
<body οncοntextmenu="self.event.returnValue=false">
<input id="codein" type="text"/>
<label id="code" class="code" onselectstart="return false" οnclick="showCode()" ></label>
</body>
<script type="text/javascript">
var charArray = new Array(0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'
,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
showCode();
function showCode()
{
var numbers='';
var color='#';
for(var i=0;i<4;i++)
{
var index1 = parseInt(Math.random()*100)%62;
numbers+=charArray[index1];
}
for(var i=0;i<6;i++){color+=parseInt(Math.random()*9);}
document.getElementById("code").style.backgroundColor=color;
document.getElementById("code").innerHTML=numbers;
}
</script>