Information Computer

Thursday, August 4, 2011

ASCII Code With JavaScript

this time I will try to explain about how to find the ASCII code keyboard with javascript. so when we typed one key on the keyboard will display a message box that displays the number or the ASCII code of the key. I'll give the source code of a simple javascript. for more details, please see the source code.

<head>
<script LANGUAGE="JavaScript">
function tampil(e)
{
alert(e.keyCode);
}
</script>
</head>
<body onload='document.getElementById("nama").focus()'>
<label>type here :</label>
<input type="text" id="nama" size="15" onKeyUp="tampil(event);"><br>
</body>

that's the way to find out the ASCII code of the keyboard keys we press with JavaScript. ask if anyone in the written comments below. thank :)

need to know! 
The American Standard Code for Information Interchange (ASCII) is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text. Most modern character-encoding schemes are based on ASCII, though they support many more characters than ASCII does.

US-ASCII is the Internet Assigned Numbers Authority (IANA) preferred charset name for ASCII.

Historically, ASCII developed from telegraphic codes. Its first commercial use was as a seven-bit teleprinter code promoted by Bell data services. Work on ASCII formally began on October 6, 1960, with the first meeting of the American Standards Association's (ASA) X3.2 subcommittee. The first edition of the standard was published during 1963, a major revision during 1967, and the most recent update during 1986. Compared to earlier telegraph codes, the proposed Bell code and ASCII were both ordered for more convenient sorting (i.e., alphabetization) of lists and added features for devices other than teleprinters.

ASCII includes definitions for 128 characters: 33 are non-printing control characters (now mostly obsolete) that affect how text and space is processed; 95 are printable characters, including the space, which is considered an invisible graphic. The most commonly used character encoding on the World Wide Web was US-ASCII until December 2007, when it was surpassed by UTF-8.

Related Posts



0 comments:

Followers