I have this little piece of code
But somehow it doesn't alert the [ic]keyCode[/ic]. :/
- Code:
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.js">
<script>
function keyup(evt) {
alert(evt.keyCode);
}
if($(input).val() > 1) {
alert("Type ONLY ONE character.");
}
</script>
</head>
<body>
<input type="text" onKeyUp="keyup(evt)">
</body>
But somehow it doesn't alert the [ic]keyCode[/ic]. :/