ASCII Code application(write in ASCII code)

hey guys,

open this file in browser and write anything in ASCII code, this is really nice application, which is used for any purpose.

i developed this application for my project purpose. and the best thing about this application is backspace also working as usual to delete last character.

so lets go for coding..

note : here i include online jquery file.. so to run this application internet must be there, or you can download js file and give link here.


<!DOCTYPE html>
<html>
<head>
<script src=”http://code.jquery.com/jquery-latest.js”></script&gt;
</head>
<body>
<p id=”t1″></p>
<script>
var keycode=0;
var k;
var temp;
var len;
var totallen,sublen;
var str=””;
document.onkeyup = function(e){
keycode = window.event.keyCode;
if(keycode == 8)
{
var data = document.getElementById(“t1″).innerHTML;
totallen = data.length;
sublen = totallen-len;
str=””;
for(var i = 0;i<sublen;i++)
{
str += data.charAt(i);
}
data = str;
$(“p”).empty();
$(“p”).append(str);

}
else
{
k = keycode;
temp = k.toString();

len = temp.length;
$(“p”).append(keycode);
}
}
</script>
</body>
</html>


hope you like this application!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s