Coolite TextField添加回车事件

一、客户端

      function Key(field,e)

       {

          if (e.getKey() == Ext.EventObject.ENTER) 

            Coolite.AjaxMethods.BtnAdd_Click(null, null); 

       } 

二、服务器端

               <ext:TextField ID="Txtbeizhu" runat="server" Width="280px">

                   <Listeners>

                      <SpecialKey Fn="tt" />

                   </Listeners>

                   <AjaxEvents>

                      <SpecialKey OnEvent="Key" />

                   </AjaxEvents>

                </ext:TextField> 

原文地址:https://www.cnblogs.com/easypass/p/1756353.html