zoukankan      html  css  js  c++  java
  • TextBox 控件录入 ,异步调用后台程序验证

    要求步骤,及实现程序。

    1、在html中,响应的一个基本单位是表单 form, 表单默认的动作模式是  method="post"

    <form id="form1" runat="server">
    <div>
    <asp:TextBox ID="TextBox1" runat="server" Style="z-index: 100;
    left: 143px; position: absolute; top: 44px" OnTextChanged="TextBox1_TextChanged"  onblur="submitform()"></asp:TextBox>

    <asp:Label ID="Label1" runat="server" Height="21px" Style="z-index: 102; left: 19px;
     position: absolute; top: 45px" Text="前台录入内容" Width="105px"></asp:Label>
    <asp:Label ID="Label2" runat="server" Height="21px" Style="z-index: 102; left: 144px;
    position: absolute; top: 95px" Width="140px"></asp:Label>
    <asp:Label ID="Label3" runat="server" Height="21px" Style="z-index: 102; left: 19px;
    position: absolute; top: 99px" Text="显示后台内容" Width="105px"></asp:Label>

    </div>
    </form>

    2、前台程序程序

    <!--异步调用后台程序-->

    <script type="text/javascript" language="javascript">
    function submitform()
    {
      var myForm=document.forms["form1"];
      myForm.action="";
      myForm.submit();
    }

    </script>

    3、后台程序

    protected void TextBox1_TextChanged(object sender, EventArgs e)
    {
          Label2.Text = TextBox1.Text;
    }

  • 相关阅读:
    礼品卡导入可用
    mysql
    初级运维工程师面试题总结
    mysql聚合函数
    去任何一个公司的思想
    mysql数据库引擎
    导入MyEclipse项目乱码
    poj 1743 后缀数组 求最长不重叠重复子串
    hdu 1011 树形dp+背包
    poj 2342 && hdu 1520 树形dp
  • 原文地址:https://www.cnblogs.com/gongyu/p/3683167.html
Copyright © 2011-2022 走看看