我有一个包含treecontrol的用户控件 [英] I have a user control that contains a treecontrol

查看:97
本文介绍了我有一个包含treecontrol的用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

并使用此用户控件,无论我需要这个,并通过单击按钮打开它,但每当我在文本框中按下我的页面上的回车键时,此用户控件将自动打开。如何在任何用户控件上显示没有我也写过javascript来处理这个但它不起作用





and used this usercontrol whereever i required this and it is opened by clicking on button but Whenever i press enter key on my page in textbox this user control automatically opens .how to display none on any of the user control I have also written javascript to handle this but it doesnot work


<script type="text/javascript">
    $(document).keydown(function (event) {
        if (event.keyCode == 13) {
            document.getElementById("<%=tvFilterLocation.ClientID %>").style.Display = "none";
            // return false;
        }

    });

解决方案

(document).keydown(function(event){
if(event.keyCode == 13){
document.getElementById(<% = tvFilterLocation.ClientID %> )。style.Display =none;
//返回false;
}

});
(document).keydown(function (event) { if (event.keyCode == 13) { document.getElementById("<%=tvFilterLocation.ClientID %>").style.Display = "none"; // return false; } });


这篇关于我有一个包含treecontrol的用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆