Klikoka Posted May 4, 2008 Share Posted May 4, 2008 I have only just learnt this and i would like too share it on here. First... Find where you want to add the script. Second... Add this in to the space <script language="JavaScript"> var r_text = new Array (); r_text[0] = "All the leaves are brown"; r_text[1] = "And the sky is grey"; r_text[2] = "I've been for a walk"; r_text[3] = "On a winter's day"; r_text[4] = "I'd be safe and warm"; r_text[5] = "If I was in L.A."; r_text[6] = "California dreaming, On such a winter's day"; var i = Math.round(6*Math.random()); document.write(r_text[i]); </script> Last... Check that the text is displaying on your webpage then add in your own text to it. Resource:Web Developers Notes Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.