如何删除文本框中的自动填充文本 [英] How to remove auto fill text in textbox

查看:279
本文介绍了如何删除文本框中的自动填充文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本框,当我登录到我的页面时,文本框自动填充文本,以前保存在我的Chrome浏览器中,我想从文本框中仅删除该文本而不删除以前保存的值< br $> b $ b

我尝试了什么:



我尝试了很多东西,还有问题。

尝试



代码落后:: txtSEmail.Attributes.Add(autocomplete,false);



jquery :: $(document).ready(function(){

$('#txtSEmail')。attr('autocomplete', 'off');

});





服务器端::< asp:TextBox ID =txtSEmailrunat =serverWidth =175pxclass =txtBoxautocomplete =off>



< asp:TextBox ID =txtSEmailrunat =serverWidth =175pxclass =txtBoxAutoCompleteType =Disabled>





这个问题有没有其他解决方案???

I have a text box,when I login to my page , text box is auto filled with texts, that is previously saved in my chrome browser, I want to remove only that text from text box without removing that previously saved values

What I have tried:

I tried many things,still have the problem.
tried

code behind :: txtSEmail.Attributes.Add("autocomplete", "false");
and
jquery ::$(document).ready(function () {
$('#txtSEmail').attr('autocomplete', 'off');
});
and

server side :: <asp:TextBox ID="txtSEmail" runat="server" Width="175px" class="txtBox" autocomplete="off">
or
<asp:TextBox ID="txtSEmail" runat="server" Width="175px" class="txtBox" AutoCompleteType="Disabled">


Is there any other solution for this problem???

解决方案

(document).ready(function(){
(document).ready(function () {


('#txtSEmail')。attr('autocomplete', '关断');

});





服务器端::< asp:TextBox ID =txtSEmail runat =serverWidth =175pxclass =txtBoxautocomplete =off>



< asp:TextBox ID =txtSEmailrunat =serverWidth =175pxclass =txtBoxAutoCompleteType =Disabled>





还有其他解决方案吗?对于这个问题???
('#txtSEmail').attr('autocomplete', 'off');
});
and

server side :: <asp:TextBox ID="txtSEmail" runat="server" Width="175px" class="txtBox" autocomplete="off">
or
<asp:TextBox ID="txtSEmail" runat="server" Width="175px" class="txtBox" AutoCompleteType="Disabled">


Is there any other solution for this problem???


试试这个

try with this one
<form id="form1" runat="server" autocomplete="off">  
//your content  
</form>  











or

By using code in .cs page,
protected void Page_Load(object sender, EventArgs e)   
{  
    if (!Page.IsPostBack)  
    {  
        txt_userid.Attributes.Add("autocomplete", "off");  
    }  
}  




Hope Its help you.

这篇关于如何删除文本框中的自动填充文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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