单击后文本框不可编辑 [英] textbox is not editable after a click
问题描述
我有问题文本框单击后无法编辑。我必须双击才能点击它。单击它,光标将转到上部文本框。如何删除它。请帮帮我。
提前致谢
<前lang =xml> < 标签 >
面积(平方英尺)
< asp:RequiredFieldValidator ID = RequiredFieldValidator1 runat = server ControlToValidate = Txtarea
ValidationGro up = 1 > < img alt =
src =' <% = ResolveClientUrl( 〜/ Images / erroricon.png)%> ' / >
< asp:TextBox ID = Txtarea runat = server >
< br / >
Region
< asp:TextBox ID = Txtregion runat = server >
名称
< span >
< asp:RequiredFieldValidator ID = RequiredFieldValidator2 runat = server < span class =code-attribute> ControlToValidate = TxtName ErrorMessage = 输入您的姓名 ValidationGroup < span class =code-keyword> = 1 >
< img alt = src =' <% = ResolveClientUrl( 〜/ Images / erroricon.png )%> ' / >
< asp:TextBox ID = TxtName runat = server >
手机号码
< asp:TextBox ID = txtmobile runat = server >
< asp:RegularExpressionValidator ID = RegularExpressionValida tor1 runat = server ValidationExpression = ^ [0-9] {10}
ControlToValidate = txtmobile ErrorMessage = 数字不正确 ValidationGroup = 1 >
< img alt = src =' <% = ResolveClientUrl( 〜/ Images /erroricon.png\")%> ' / >
< br / >
< div 样式 = 明确:两者; padding-top:22px; >
< / div >
< < span class =code-leadattribute> asp:按钮 ID = Btnsave runat = server 文字 = 发送 < span class =code-attribute> 宽度 = 78px 样式 = color:#fff;
字体大小:12px;行高:15px; background:url(../ images / button-1.jpg)0 0 repeat-x#08489f;
border-top:#339ed3 1px solid; border-right:#2881c3 1px solid; border-bottom:#1a62b1 1px solid;
border-left:#2881c3 1px solid; display:inline-block; text-decoration:none;
填充:5px 21px 7px 19px; cursor:pointer; OnClick = Btnsave_Click ValidationGroup < span class =code-keyword> = 1 / >
< asp:标签 ID = Label1 runat = server ForeColor = Black >
< / span >
< < span class =code-leadattribute> / label >
[/ Edit]
我认为由于标签(asp控件)关闭不当,可能会引发这个问题。
i改变了一些代码,它对我来说很好。查看
< label >
面积(平方英尺)
< asp:RequiredFieldValidator ID = RequiredFieldValidator1 runat = server ControlToValidate = Txtarea
< span class =code-attribute> ValidationGroup = 1 > < img alt = src =' <% = ResolveClientUrl( 〜/ Images / erroricon.png)%> ' / < span class =code-keyword>> < / asp:RequiredFieldValidator < span class =code-keyword>>
< asp:TextBox ID = Txtarea runat = 服务器 > < / asp:TextBox >
< br / >
Region
< asp:TextBox ID = Txtregion runat = server > < / asp:TextBox >
名称
< span >
< asp:RequiredFieldValidator ID = RequiredFieldValidator2 runat = 服务器 ControlToValidate = TxtName
ErrorMessage = 输入您的姓名 ValidationGroup = 1 > < img alt = src =' <% = ResolveClientUrl( 〜/ Images / erroricon.png)%> ' / > < / asp:RequiredFieldValidator >
< asp:TextBox ID = TxtName runat = server > < / asp:TextBox >
手机号码
< < span class =code-leadattribute> asp:TextBox ID = txtmobile < span class =code-attribute> runat = server > < / asp:TextBox >
< asp:RegularExpressionValidator ID = RegularExpressionValidator1 runat = server < span class =code-attribute> ValidationExpression = ^ [0-9] {10}
< span class =code-attribute> ControlToValidate = txtmobile ErrorMessage = 不正确的Nu mber ValidationGroup = 1 >
< img alt = src =' <% = ResolveClientUrl( 〜/ Images / erroricon.png)%> ' / > < / asp:R egularExpressionValidator >
< br / >
< div style = clear:both; padding-top:22px; >
< / div >
< < span class =code-leadattribute> asp:按钮 ID = Btnsave runat = server 文字 = 发送 < span class =code-attribute> 宽度 = 78px 样式= color:#fff;
字体大小:12px;行高:15px; background:url(../ images / button-1.jpg)0 0 repeat-x#08489f;
border-top:#339ed3 1px solid; border-right:#2881c3 1px solid; border-bottom:#1a62b1 1px solid;
border-left:#2881c3 1px solid; display:inline-block; text-decoration:none;
填充:5px 21px 7px 19px; cursor:pointer; ValidationGroup = 1 / < span class =code-keyword>>
< asp:Label ID = Label1 runat = server ForeColor = 黑色 > < / asp:Label >
< / span < span class =code-keyword>>
< / label >
标签标签在删除后会解决此类问题。运作良好:))
i have problem textbox is not editable after a single click. I have to make double to click to write in it. On single click it cursor goes to upper text box. How to remove it. please help me.
Thanks in advance
[Edit]
<label>
Area(in Sq Ft)
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="Txtarea"
ValidationGroup="1"> <img alt=""
src='<%=ResolveClientUrl("~/Images/erroricon.png")%>' />
<asp:TextBox ID="Txtarea" runat="server">
<br />
Region
<asp:TextBox ID="Txtregion" runat="server">
Name
<span>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtName" ErrorMessage="Enter Your Name" ValidationGroup="1">
<img alt="" src='<%=ResolveClientUrl("~/Images/erroricon.png")%>' />
<asp:TextBox ID="TxtName" runat="server">
Mobile No.
<asp:TextBox ID="txtmobile" runat="server">
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ValidationExpression="^[0-9]{10}"
ControlToValidate="txtmobile" ErrorMessage="Incorrect Number" ValidationGroup="1">
<img alt="" src='<%=ResolveClientUrl("~/Images/erroricon.png")%>' />
<br />
<div style="clear: both; padding-top: 22px;">
</div>
<asp:Button ID="Btnsave" runat="server" Text="Send" Width="78px" Style="color: #fff;
font-size: 12px; line-height: 15px; background: url(../images/button-1.jpg) 0 0 repeat-x #08489f;
border-top: #339ed3 1px solid; border-right: #2881c3 1px solid; border-bottom: #1a62b1 1px solid;
border-left: #2881c3 1px solid; display: inline-block; text-decoration: none;
padding: 5px 21px 7px 19px; cursor: pointer;" OnClick="Btnsave_Click" ValidationGroup="1" />
<asp:Label ID="Label1" runat="server" ForeColor="Black">
</span>
</label>
[/Edit]
i think that due to the improper close of the tags (asp controls) this issue might have raised.
i changed the code a bit and it worked fine for me. Check it out
<label> Area(in Sq Ft) <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="Txtarea" ValidationGroup="1"> <img alt="" src='<%=ResolveClientUrl("~/Images/erroricon.png")%>' /> </asp:RequiredFieldValidator> <asp:TextBox ID="Txtarea" runat="server"></asp:TextBox> <br /> Region <asp:TextBox ID="Txtregion" runat="server"></asp:TextBox> Name <span> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtName" ErrorMessage="Enter Your Name" ValidationGroup="1"> <img alt="" src='<%=ResolveClientUrl("~/Images/erroricon.png")%>' /></asp:RequiredFieldValidator> <asp:TextBox ID="TxtName" runat="server"></asp:TextBox> Mobile No. <asp:TextBox ID="txtmobile" runat="server"></asp:TextBox> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ValidationExpression="^[0-9]{10}" ControlToValidate="txtmobile" ErrorMessage="Incorrect Number" ValidationGroup="1"> <img alt="" src='<%=ResolveClientUrl("~/Images/erroricon.png")%>' /></asp:RegularExpressionValidator> <br /> <div style="clear: both; padding-top: 22px;"> </div> <asp:Button ID="Btnsave" runat="server" Text="Send" Width="78px" Style="color: #fff; font-size: 12px; line-height: 15px; background: url(../images/button-1.jpg) 0 0 repeat-x #08489f; border-top: #339ed3 1px solid; border-right: #2881c3 1px solid; border-bottom: #1a62b1 1px solid; border-left: #2881c3 1px solid; display: inline-block; text-decoration: none; padding: 5px 21px 7px 19px; cursor: pointer;" ValidationGroup="1" /> <asp:Label ID="Label1" runat="server" ForeColor="Black"></asp:Label> </span> </label>
label tag was crating such problem, after removing it. working well :)
这篇关于单击后文本框不可编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!