CalHTMLPane v2.0 Guide Example Tag Usage


2: Forms

Attr: accesskey

Synopsis:
Use this attribute to give a keyboard accelerator to a form component.

For form buttons created with the INPUT tag the button text will show the accelerator underlined.

For other controls the U (underline) tag can be used to mark the key accelerator.

Note that the LABEL tag can be used to pass focus to another form component by using the for attribute (see HTML4.0 spec).

Example:

<P align=center>
<INPUT type=button value="Press me" accesskey="P">  
Your <U>n</U>ame: <INPUT type=text accesskey=n>
<P align=center>
<LABEL bgcolor=white for=mycombo accesskey='c'><U>C</U>omposer</LABEL>
<SELECT id=mycombo>
  <OPTION>Mozart
  <OPTION>Schubert
  <OPTION>Bach
</SELECT>

Rendering: Note: Java 1.2 has a bug (no. 4159610) relating to this example. If the textfield has focus and an accelerator is used for a different control, the accelerator character will show within the textfield

   Your name:



Guide Index  |  JavaDoc  |  Previous  |  Next