var images=['/p1.jpg','p2.jpg','p3.jpg'];var url=images[Math.floor(Math.random()*images.length)];console.log(url);