Tracing Keycode with JScript

Tracing KeyCode using JScript for the client side validation is as mentioned in the below example.

function TraceKeyCodeValu(e)
{
if(((e.which) ? e.which : event.keyCode) == 120)
{
alert('F9 Encountered..');
}
}

This function is called on the KEYDOWN event of the text box as

INPUT id="txtUsrIp" type="text" onkeydown="TraceKeyCodeValu(event);

Comments

Popular posts from this blog

Network Intrusion Detection using Supervised ML technique

Common mistakes by Interviewer

Keep the system active, to avoid the auto lock