Usage of access key (access keys) in HTML

Source: Internet
Author: User
Access is called an "access key" just like an alt shortcut in a Windows application, pressing the ALT key and an alphabetic key to quickly switch to a text box, button, and other page objects.

(1), Access Key to the text box:
<FORM>
<label for= "Namebox" accesskey= "N" ><U>N</U>ame:</LABEL>
<input type= "TEXT" id= "Namebox" size=30>
<label for= "Emailbox" accesskey= "E" ><U>E</U>mail:</LABEL>
<input type= "TEXT" id= "Emailbox" size=30>
<label for= "Areabox" accesskey= "S" ><U>S</U>uggest</LABEL>
<textarea id= "Areabox" cols= "Ten" rows= "2" ></TEXTAREA>
</FORM>
The <U>...</U> labels are underlined; for= "name" and "name" in id= are consistent; accesskey= ... Set the hotkey.

(2), the selection of the box acsess Key: Select items do not have to click the mouse in the box, the text can be selected:
<form>
<label for= "Check1" > I love Zhang Qing </label>
<input type= "CHECKBOX" id= "Check1" value= "often" name= "Checkoften" >
<label for= "Check2" > I love "100,000 Why" website </label>
<input type= "CHECKBOX" id= "Check2" value= "Seldom" name= "Checkseldom" >
</form>

(3), link shortcut key:
Press alt+[letter] can open a link, convenient inconvenient?
<a href= "your_page.htm" accesskey= "A" > Press alt+a to open the link </A>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.