html - 单击后文本框不可编辑

标签 html asp.net css webforms

我的问题是单击后文本框不可编辑。我必须双击才能在其中写入。单击它时,光标会转到上方的文本框。如何删除它。请帮我。 提前致谢

代码在这里

<form id="form1" class="form-style" method="post" runat="server">
    <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">    
     Region 
    <asp:TextBox ID="Txtregion" runat="server">
     Name
    <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")%>' />
    <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">
     </label>
</form> 

这是CSS

.form-style .jqTransformHidden {
    display:none;
}
.form-style .jqTransformSelectWrapper {
    position:relative;
    height:21px;
    font-family:Arial,Helvetica,sans-serif;
    color:#8e8e8e;
    font-size:12px;
    height:31px;
    background:url(../images/select.jpg) 0 0 repeat-x #ececec;
    border:1px solid #cecece;
}
.form-style .jqTransformSelectWrapper div {
    font-family:Arial,Helvetica,sans-serif;
    color:#8e8e8e;
    font-size:12px;
    line-height:15px;
    white-space:nowrap;
}
.form-style .jqTransformSelectWrapper div span {
    display:block;
    width:100% !important;
    cursor:pointer;
    padding:7px 3px 9px 25px;
}
.form-style .jqTransformSelectWrapper a.jqTransformSelectOpen {
    cursor:pointer;
    display:block;
    position:absolute;
    height:31px;
    width:29px;
    right:0px;
    top:0px;
    background:url(../images/select.png) no-repeat 0 0;
    border-left:#d5d5d5 1px solid;
}
.form-style .jqTransformSelectWrapper div:hover a.jqTransformSelectOpen {
    background-position:right 0;
}
.form-style .jqTransformSelectWrapper ul {
        position:absolute;
        top:31px;
        left:-1px;
        background:#ececec;
        display:none;
        margin:0px;
        padding:0px;
        overflow:auto;
        overflow-y:auto;
        z-index:10;
        border:1px solid #cecece;
}
.form-style .jqTransformSelectWrapper ul a {
    display:block;
    color:#8e8e8e;
    padding-left:25px;
    font-size:12px;
    line-height:20px;
}
.form-style .jqTransformSelectWrapper ul a.selected {
    color:#929291;
}
.form-style .jqTransformSelectWrapper ul li:hover {
    background:#fff;
}
.form-style .jqTransformSelectWrapper ul li a.selected:hover {
    color: #929291;
}

最佳答案

使用这段代码..我已经修复了..工作正常

  <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="Txtarea" ValidationGroup="1"> 

  </asp:RequiredFieldValidator> <img alt="" src='<%=ResolveClientUrl("~/Images/erroricon.png")%>' />
  <asp:TextBox ID="Txtarea" runat="server" placeholder="Area(in Sq Ft)">    
  </asp:TextBox> 
  <asp:TextBox ID="Txtregion" runat="server" placeholder="Region">
   </asp:TextBox> 
  <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" placeholder="Name">   
   </asp:TextBox> 
   <asp:TextBox ID="txtmobile" runat="server" placeholder="Mobile No."></asp:TextBox>     
  <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ValidationExpression="^[0-9]{10}" ControlToValidate="txtmobile" ErrorMessage="Incorrect Number" ValidationGroup="1">
 </asp:RegularExpressionValidator> 
 <img alt="" src='<%=ResolveClientUrl("~/Images/erroricon.png")%>' />
 <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">
  </asp:Label>

关于html - 单击后文本框不可编辑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18738861/

相关文章:

javascript - 不能在模块外使用 import 语句

ASP.Net 数据库中的用户 Activity 跟踪

c# - 如何在windows phone 7中显示Json数据

javascript - 从 Javascript 内部调用 Javascript

html5 2 image inside section 只有CSS

javascript - 如何分别启用对所有循环图像的点击

html - 绝对定位元素的高度 100%

html - 在 Visual Studio 2019 中使用的 Razor View 未更新

javascript - 接受 CTRL + A 按键吗?

html - CSS 中的 <hr> 遇到问题