<--- --------------------------------------------------------------------------------------- ---- Blog Entry: Ask Ben: Javascript String Replace Method Author: Ben Nadel / Kinky Solutions Link: http://www.bennadel.com/index.cfm?dax=blog:142.view Date Posted: Jul 17, 2006 at 7:36 AM ---- --------------------------------------------------------------------------------------- ---> function RandomString(){ // Create an array of letters. var arrLetters = ["A","B","C","D","E","V","W","X","Y","Z"]; // Use the random() method and the modulus (%) operator to // pick a random letter from the above array. var intLetter = (Math.floor( Math.random() * 10 ) % 9); // Return the random letter string we get from the // array of letters above. return( "[" + arrLetters[ intLetter ] + "]" ); }