Character to ASCII

[Total: 0    Average: 0/5]

This shows how to convert any given character to a ASCII representation. The example shows the ASCII values for the strings “0”,”1″, “2”, .. “9”

Body Code:

<script type=text/javascript>
var _i;
for (i=0;i<10;i++) {
  document.write(i+" has an ASCII value of "+
                 i.toString().charCodeAt(0)+"<BR>");
}
</script>

Times Viewed: 6

Leave a Reply

Your email address will not be published. Required fields are marked *