Load Random background colors through Random function

vishalneeraj-24503
Posted by vishalneeraj-24503 under JavaScript category on | Points: 40 | Views : 227
<script language = "javascript">
var background_color_list = new array("#dfdfff","#ffffbf","#80ff80","#eaeaff","#c9ffa8","#f7f7f7","#ffffff", "#dddd00");

document.body.style.background = background_color_list[math.floor(math.random()*background_color_list.length)];
</script>

Comments or Responses

Login to post response