zoukankan      html  css  js  c++  java
  • 用户小体验

    写一个用户体验的,  当用户填写 表格时。
    这里就有:
         1.focus的设置 这里有3个点的代码
        
    vb code   Page.SetFocus(txtifirstname)  
                  Page.Form.DefaultButton = lbSubmit.UniqueID
    asp.net    <asp:Label ID="txtifirstname" runat="server" Text="Name :* " AssociatedControlID="ifirstname" CssClass="title5"></asp:Label>
                 <asp:TextBox ID="ifirstname" runat="server" Width="155px" MaxLength="50"></asp:TextBox>
    <asp:RequiredFieldValidator SetFocusOnError="true" Display="Dynamic" ID="Requiredifirstname" CssClass="color" runat="server" ErrorMessage="please enter your first name." ValidationGroup="pageoneform" Text="*" ControlToValidate="ifirstname">
    <asp:RequiredFieldValidator>
      
         2.各种validation的提示
           Display="Dynamic" Display="Static" 的区别 在于 一个先激活 一个激活。
     
         3. 还有两个值得提到的是自动转换成大写字母的CSS 和 限制只能输入数字的JAVASCRIPT 
       function ValidateText(i)
        {
          if(i.value.length>0)
           {
           i.value = i.value.replace(/[^\d]+/g, '');
           }
        }
        .uppercase
        {
          font-size: 12px;
          font-family: Arial, Helvetica, sans-serif;
          font-weight: normal;
          text-transform: uppercase;
        }
     
     
     
  • 相关阅读:
    微信小程序里使用 Redux 状态管理
    ES6基础
    微信小程序入门
    Redis 安装
    ServiceStack.Redis 使用
    改善C#程序,提高程序运行效率的50种方法
    Jquery Ajax调用aspx页面方法
    WebAPI创建
    Find the Difference -- LeetCode
    Encode and Decode Strings -- LeetCode
  • 原文地址:https://www.cnblogs.com/sandy_liao/p/1358760.html
Copyright © 2011-2022 走看看