Random string will show here
click here for live demo
<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript">// <![CDATA[
var lineIds = new Array();
lineIds[0] = "sat3oiorab";
lineIds[1] = "retozarrourn";
lineIds[2] = "you6oeat2r";
lineIds[3] = "seartmynlf";
lineIds[4] = "isartmyna";
lineIds[5] = "pagsguexge";
lineIds[6] = "mycishahbar";
lineIds[7] = "acsyoikecess";
lineIds[8] = "ope3lwzaol";
lineIds[9] = "metrtnwgaho";
lineIds[10] = "whlooegtat";
lineIds[11] = "iwg9vletas";
lineIds[12] = "gosaohzming";
lineIds[13] = "toscsxejtay";
lineIds[14] = "iseehmp8this";
lineIds[15] = "agsoyb5oood";
lineIds[16] = "mepaatzathod";
lineIds[17] = "idohvqaiont";
lineIds[18] = "kuaiz51now";
lineIds[19] = "hov89rmowtoget";
function RandomValue()
{
var rand = lineIds[Math.floor(Math.random() * lineIds.length)];
return rand;
}
function RandomId()
{
var text = "";
var possible = "A"+RandomValue()+
"BC"+RandomValue()+
"DE"+RandomValue()+
"F"+RandomValue()+
"GH"+RandomValue()+
"IJ"+RandomValue()+
"KL"+RandomValue()+
"MN"+RandomValue()+
"OPQRST"+RandomValue()+
"U"+RandomValue()+"VWX"
+RandomValue()+"YZab"+
RandomValue()+
"c"+RandomValue()+
"de"+RandomValue()+
"fgh"+RandomValue()+
"ij"+RandomValue()+
"k"+RandomValue()+
"lm"+RandomValue()+
"nop"+RandomValue()+
"qrs"+RandomValue()+
"tu"+RandomValue()+
"vw"+RandomValue()+
"xyz01"+RandomValue()+
"23"+RandomValue()+
"456"+RandomValue()+
"78"+RandomValue()+"9";
for( var i=0; i < 5; i++ )
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text.toLowerCase();
}
$("#tp").html("");
// genrate random string in javascript
$("#tp").append(RandomId());
// ]]></script>
<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript">// <![CDATA[
var lineIds = new Array();
lineIds[0] = "sat3oiorab";
lineIds[1] = "retozarrourn";
lineIds[2] = "you6oeat2r";
lineIds[3] = "seartmynlf";
lineIds[4] = "isartmyna";
lineIds[5] = "pagsguexge";
lineIds[6] = "mycishahbar";
lineIds[7] = "acsyoikecess";
lineIds[8] = "ope3lwzaol";
lineIds[9] = "metrtnwgaho";
lineIds[10] = "whlooegtat";
lineIds[11] = "iwg9vletas";
lineIds[12] = "gosaohzming";
lineIds[13] = "toscsxejtay";
lineIds[14] = "iseehmp8this";
lineIds[15] = "agsoyb5oood";
lineIds[16] = "mepaatzathod";
lineIds[17] = "idohvqaiont";
lineIds[18] = "kuaiz51now";
lineIds[19] = "hov89rmowtoget";
function RandomValue()
{
var rand = lineIds[Math.floor(Math.random() * lineIds.length)];
return rand;
}
function RandomId()
{
var text = "";
var possible = "A"+RandomValue()+
"BC"+RandomValue()+
"DE"+RandomValue()+
"F"+RandomValue()+
"GH"+RandomValue()+
"IJ"+RandomValue()+
"KL"+RandomValue()+
"MN"+RandomValue()+
"OPQRST"+RandomValue()+
"U"+RandomValue()+"VWX"
+RandomValue()+"YZab"+
RandomValue()+
"c"+RandomValue()+
"de"+RandomValue()+
"fgh"+RandomValue()+
"ij"+RandomValue()+
"k"+RandomValue()+
"lm"+RandomValue()+
"nop"+RandomValue()+
"qrs"+RandomValue()+
"tu"+RandomValue()+
"vw"+RandomValue()+
"xyz01"+RandomValue()+
"23"+RandomValue()+
"456"+RandomValue()+
"78"+RandomValue()+"9";
for( var i=0; i < 5; i++ )
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text.toLowerCase();
}
$("#tp").html("");
// genrate random string in javascript
$("#tp").append(RandomId());
// ]]></script>
No comments:
Post a Comment