How to create random images vrmlstudio at November 21, 2018 Javascript, Orange Pi, the first PC under $10 Nov 28 2018 - vrmlstudioExtract emails from a string (HTML Page) Nov 22 2018 - vrmlstudioHow to create random images Nov 21 2018 - vrmlstudioRotating CSS Cube Nov 18 2018 - vrmlstudioAnimated 3D Logo in CSS Nov 18 2018 - vrmlstudio Just use an array of images .Example: <script type="text/javascript">var imgArray = ['img1.jpg','img2.jpg','img3.jpg','img4.jpg','img5.jpg' ]; var num = Math.floor( Math.random() * imgArray.length ); var img = imgAr[ num ]; var imgStr = '<img src="' + img + '" alt = "Random Image" width="100%">'; document.write(imgStr); </script> Share To: Next Extract emails from a string (HTML Page) Previous Rotating CSS Cube vrmlstudio View Profile Related ArticlesHTML Parser / AdSense Code Converter
Post A Comment:
0 comments so far,add yours