开发者

disabling property of a textbox

when i click on a text开发者_StackOverflow社区 box or start typing in a text box, its showing the previously entered string below it, i want to disable this property of a text box, how can i do this?

please help me

Thanks


You can try setting autocomplete="off" as an attribute on the <input type="text">. Note that this isn't a standard attribute though, and will break HTML validation.


this is a browser-issue

In Firefox: Extra -> Options --> Privacy --> Remember search and formhistory (or something like that, I have Firefox in Dutch)

For IE: http://www.computerhope.com/issues/ch000604.htm


Try this

<input type="textbox" id="myTextBox" autocomplete="off" /> 

For an asp textbox

<asp:TextBox AutoCompleteType="Disabled" runat="server" ID="myBox"></asp:TextBox>

See autocomplete attribute

The autocomplete attribute applies to the text, password, select, textarea, date-related, time-related, numeric, email, and uri controls. The attribute takes two values, on and off. The default, when the attribute is not specified, is on.


Set the autocomplete attribute in the form element to "off". Said attribute is not standard, but should work on most browsers. See this

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜