<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function getKeyCode()
{
var character = document.characterCode.character.value.substring(0,1);
var code = document.characterCode.character.value.charCodeAt(0);
var msg = "The ASCII Decimal Key Code for the \""+character+"" character is "+code+".";
{
alert(msg);
}}
</script>
</HEAD>
<BODY>
<form name="characterCode method="post" action="" enctype="multipart/form-data">
<center>Type A Character
<input name="character" maxlength="1" size="1" TYPE="text">
<input type="button" value="Get ASCII Value"
onClick="getKeyCode()">
</center>
</form>
</BODY>
</HTML>
Can anyone tell me why this won't work? What I need to change...
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function getKeyCode()
{
var character = document.characterCode.character.value.substring(0,1);
var code = document.characterCode.character.value.charCodeAt(0);
var msg = "The ASCII Decimal Key Code for the \""+character+"" character is "+code+".";
{
alert(msg);
}}
</script>
</HEAD>
<BODY>
<form name="characterCode method="post" action="" enctype="multipart/form-data">
<center>Type A Character
<input name="character" maxlength="1" size="1" TYPE="text">
<input type="button" value="Get ASCII Value"
onClick="getKeyCode()">
</center>
</form>
</BODY>
</HTML>
Can anyone tell me why this won't work? What I need to change...