Genrate Number To String

This code allows to generate number to character using array function in JavaScript


< html xmlns="http://www.w3.org/1999/xhtml" >
< head runat="server" >
< title > Untitled Page< /title >
< script >

function NtCode(RecVal)
{
var t2="";
var t1=new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
for(var i=0;i< RecVal.length;i++)
{
t2=t2+t1[i];
}
alert(t2);

}
< /script >
< /head >
< body >
< form id="form1" runat="server" >
< asp:TextBox ID="Txt1" runat ="server" >< /asp:TextBox >

< input type ="button"
onclick ="NtCode(document.getElementById('Txt1').value);"
value ="ClickHere" id="Button1" / >

< /form >



< /body >
< /html >


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: