Disable the auto-Prompt function of the input text box

Source: Internet
Author: User

The automatic prompt function of the text input box is enabled in the browser. Sometimes we do not need the automatic prompt function. For example, you need to enter the information again rather than automatically. In IE, you can use the tool-content-auto-completion option to set it.

 

Set the autocomplete attribute of the input element to off to disable the automatic prompt.

<Input type = "text" name = "name" AutoComplete = "off">

 

 

If you do not want to use the auto-Prompt function for all form elements, you only need to set AutoComplete = off on the Form.

<Form AutoComplete = "off">
<Input type = "text" name = "name">
<Input type = "text" name = "password">
</Form>

 

 

The Asp.net Textbox Control also provides the autocompletetype attribute and an enhanced version of autocomplete. You can enable or disable automatic prompts as needed. After you set the autocompletetype of textbox to "Disable", the prompt will not appear after the Automatic completion.

 

<Asp: textbox id = "txtusername" runat = "server" autocompletetype = "disabled" width = "150px"> </ASP: textbox> <

 

 

Autocompletetype is a list type. All supported items are as follows:

Member name Description
Businesscity The city where the office address is located.
Businesscountryregion Country/region where the office address is located.
Businessfax The fax number category of the office address.
Businessphone The telephone number category of the office address.
Businessstate The State where the office address is located.
Businessstreetaddress The street type of the office address.
Businessurl The URL category of the business website.
Businesszipcode The zip code category of the office address.
Cellular Mobile phone number category.
Company Enterprise Name category.
Department Department category in the enterprise.
Disabled Disable auto-completion for textbox controls.
Displayname The name category displayed for this user.
Email The email address category of the user.
Firstname User name category.
Gender User gender category.
Homecity The city where the residential address is located.
Homecountryregion Country/region where the home address is located.
Homefax The fax number category of the home address.
Homepage The URL category of the website.
Homephone The telephone number category of the home address.
Homestate The State where the home address is located.
Homestreetaddress The street type of the residential address.
Homezipcode The zip code category of the home address.
Jobtitle The role category of the user.
Lastname The last name category of the user.
Middlename The name category of the user.
None No category is associated with the Textbox Control. All textbox controls with the same ID share the same value list.
Notes Any supplemental information to be included in the form category.
Office Business Office location category.
Pager The type of the pager number.
Search Search for the keyword category of a webpage or website.

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.