如何在用户控件模糊事件上触发javascript函数

时间:2013-10-10 09:40:25

标签: javascript jquery asp.net web-user-controls

我正在开发Web user control

的.ascx

<div style="position:relative;border:none;" id="divComboContainer" runat="server" >
    <asp:HiddenField ID="Hidden_TextField" Value="" runat="server" />
    <asp:HiddenField ID="Hidden_ValueField" Value="" runat="server" />
    <asp:HiddenField ID="Hidden_Value" Value="" runat="server" />
    <asp:HiddenField ID="Hidden_Row_Index" Value="" runat="server" />
    <asp:HiddenField ID="hfScrollPosition" Value="" runat="server" />
    <asp:TextBox ID="txtDisplay" runat="server" CssClass="tb10" ></asp:TextBox>
    <asp:Panel ID="DropPanel" runat="server" CssClass="ContextMenuPanel" 
            Width="280px" style="display :none;visibility: hidden;padding-bottom:-1px;
            margin-top:-28px;margin-left:0px;background-color:#F5F5F5;overflow:hidden;
            height:auto;min-height:100px;max-height:300px;max-width:350px;" >
        <div id="CombClose" style="padding-right:2px;color:#FFFFFF;text-align:right;cursor:pointer;height:35px;background-color:#507CD1;width:100%;" runat="server" >Close</div>
        <br />
        <div runat="server" id="listDiv" style="padding-bottom:-1px;margin-top:-28px;
            margin-left:0px;background-color:#F5F5F5;overflow-Y:auto;overflow-X:hidden;
            height:200px;max-height:265px;max-width:350px;" tabindex="0">
            <asp:CheckBoxList ID="chkList" runat="server" CssClass="Chklist"> 
            </asp:CheckBoxList>
        </div>
    </asp:Panel>
    <ajaxToolkit:DropDownExtender runat="server" ID="DDE" TargetControlID="txtDisplay" 
        DropDownControlID="DropPanel" HighlightBorderColor="Transparent" OnClientPopup="OnClientPopup" />
</div>

在此控件中,我需要在lostFocus或blur事件上触发一些java-script

任何人都可以指导我如何在控制模糊或lostFocus上调用我的脚本。

0 个答案:

没有答案