Display Asic value Of the Character When Onkeyup Event Occur in Html


Start the program.In the body section declare the OnKeyUP equal to whichbutton(event)
Whichbutton is the function.So when the Key up it pass there appropriate asic value to the function to the whichButton fucntion.It display the value by through event.keyCode parameter.After display the value termiante the Event program.These Onkeyup is simillar to the onClickDown.OnkeyDown it is perfrom there opertion when key down. Onkeyup it fires event when key up.
<script language="javascript">
function whichButton(event)
alert("The key code is " +event.keyCode);
<Body onKeyUp="whichButton(event)" bgcolor="#ffe4c4">
<br><h1><font face="arial" color="brown"><u>
Keyboard Event:</u></font></h1><hr><hr><br><font face="verdona" color="blue" size=5>
<p>Press any key on your keyboard!<br>
An alert box will pop up to show you the keycode of the keypressed</p></font>

onkeyup event in Dhtml keycode

1 comment:
Write comments