You are here: irt.org | FAQ | JavaScript | Form | 2 | Q135 [ previous next ]
There is nothing inbuilt that will provide this information for you. What you could do is monitor this yourself by declaring a variable which holds the information of the element that has the focus, and then monitoring it using onFocus() and onBlur() event handlers to keep the variable updated.
All form elements except hidden support onFocus(), however on UNIX, Netscape 2 and 3 only support onFocus() for text entry type fields, i.e. text,textarea and fileupload.