从细节填充文本框停止浏览器 [英] Stop browser from filling textboxes with details

查看:130
本文介绍了从细节填充文本框停止浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我碰到一个非常恼人的问题,我希望这只是我已经错过了一个设置。我有一个ASP.NET应用程序,它允许用户在不同的地方输入自己的用户名/密码(例如登录,修改密码,修改用户名等)。当我登录时,浏览器问我是否想存储用户的细节。通常情况下,我点击'不',但这次,我决定请单击是。现在,在我的某些形式的文本输入框是与用户名或密码pfilled $ P $。是否可以删除这些,因为他们有时会出现在文本框中这不应该是prefilled。我尝试设置 AutoCompleteType =无文本='',但它仍然得到prefilled。该文本框没有很多共同点,除了相同的的CssClass ,并为密码箱,的TextMode =密码。名称不同,虽然有时它们包括字名称(例如全名,用户名)。有没有办法阻止填满某些文本框的浏览器?

感谢


解决方案

 <输入类型=文本名称=用户名自动完成=关闭>

您也可以把这个格式标签上。注意,这并不适用于所有浏览器的一致性。

I've run into a really annoying problem, and I'm hoping it's just a setting I've missed. I've got an ASP.NET application which allows users to enter their username/password in various places (e.g. login, change password, change username etc..). When I logged in, the browser asked if I would like to store the user details. Usually, I click 'no', but this time I decided to click 'yes'. Now, certain textboxes in my form are prefilled with the username or password. Is it possible to remove these, as they sometimes appear in textboxes which shouldn't be prefilled. I tried setting AutoCompleteType=none and Text='' but it still gets prefilled. The textboxes don't have much in common, except the same CssClass and, for password boxes, TextMode=password. The names are different, although sometimes they include the word name (e.g. fullName, userName). Is there a way to stop the browser from filling certain textboxes?

Thanks

解决方案

  <input type="text" name="Username" autocomplete="off">

You can also put this on the form tag. Note this does not work consistently in all browsers.

这篇关于从细节填充文本框停止浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆