Jan 08, 2013, 8:41 AM
I have one TextField id='TF_name'
and one ComboBox id='CB_type'
when ComboBox is focus , by javascript can set TextField focus
but ComboBox can't Blur
when ComboBox is focus,press ENTER,TextField is focus,but ComboBox can't Blur
only can by mouse
and one ComboBox id='CB_type'
when ComboBox is focus , by javascript can set TextField focus
but ComboBox can't Blur
when ComboBox is focus,press ENTER,TextField is focus,but ComboBox can't Blur
only can by mouse
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="测试_Default2" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:ComboBox ID="cb_type" runat="server" FieldLabel="type" LabelAlign="Right" LabelWidth="60"
Padding="10" ValueField="dwmc" DisplayField="dwmc" IndicatorText="*" IndicatorCls="xingred"
TabIndex="0">
<Listeners>
<SpecialKey Handler="if(e.getCharCode()==e.ENTER){Ext.getCmp('tf_name').focus();}" />
<Focus Handler="function(e){e.expand();}" />
<Blur Handler="alert('lost focus')" />
</Listeners>
</ext:ComboBox>
<ext:TextField ID="tf_name" runat="server" FieldLabel="name" LabelAlign="Right" LabelWidth="60"
Padding="10" IndicatorText="*" IndicatorCls="xingred" TabIndex="4">
</ext:TextField>
</form>
</body>
</html>