Load Random background Images through Random Javascript function

vishalneeraj-24503
Posted by vishalneeraj-24503 under JavaScript category on | Points: 40 | Views : 285
<script type="text/javascript">
var background_images =["../images/view1.jpg","../images/view2.jpg","../images/view3.jpg","../images/view4.jpg"]

document.body.style.background = 'white url('+math.floor(math.random()*background_images.length)]+')');
</script>

Comments or Responses

Login to post response