Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Attributes for <INPUT ...>
onKeyUp = "script command(s)"
onKeyDown = "script command(s)"

onKeyDown is triggered when the user presses down on a key while the cursor is in the input field. onKeyUp is triggered when the the key goes up again. For example, the following code puts "down!" in the status bar when the key goes down, and "up!" when the key goes up:

this code produces this
<INPUT 
    NAME="realname" 
    onKeyDown="window.status='down!'"
    onKeyUp="window.status='up!'">

onKeyDown and onKeyUp represent the component actions of pressing a key. They cannot be cancelled. In most situations where you might consider using onKeyDown or onKeyUp you will probably find that onKeyPress is more useful. onKeyPress represents the entire keystroke and can cancel the keystroke.

 
 
  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire