Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Fill text with javascript (See related posts)

// description of your code here

   1  
   2  <script type="text/javascript">
   3  /*** Temporary text filler function. Remove when deploying template. ***/
   4  var gibberish=["This is just some filler text", "Another some text here", "Demo content nothing to read here"]
   5  function filltext(words){
   6  for (var i=0; i<words; i++)
   7  document.write(gibberish[Math.floor(Math.random()*3)]+" ")
   8  }
   9  </script>
  10  <script type="text/javascript">filltext(255)</script>

You need to create an account or log in to post comments to this site.


Click here to browse all 5350 code snippets

Related Posts