将登录表单下拉到Bootstrap的Navbar按钮单击登录表单已关闭的问题 [英] Drop Down Login Form to Bootstrap’s Navbar button click login form closed problem

查看:92
本文介绍了将登录表单下拉到Bootstrap的Navbar按钮单击登录表单已关闭的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我在bootstrap下拉列表中使用登录表单。



hello,

I use login form in bootstrap dropdown.

<ul class="dropdown-menu" id="dropdown-login" style="width:350px;">
                               <div class="block-heading">Sign In</div>
                               <div class="block-body">
                                   <asp:Label ID="Label1" runat="server" Text="Invalid UserName and Password!!" Visible="false" Font-Bold="True" ForeColor="Red"></asp:Label>
                                   <label>Emial ID</label>
                                   <asp:TextBox ID="txtEmailID" CssClass="span4" runat="server"></asp:TextBox>
                                   <label>Password</label>
                                   <asp:TextBox ID="txtPassword" TextMode="Password" CssClass="span4" runat="server"></asp:TextBox>
                                  <asp:Button ID="btnLogin" CssClass="btn btn-primary pull-right" runat="server" OnClick="btnLogin_Click" Text="Sign In" />
                                   <label class="remember-me"><input type="checkbox"> Remember me</label>
                                   <p><a href="#Forgot" >Forgot your password?</a></p>
                                   <div class="clearfix"></div>
                               </div>
                           </ul>







i使用javascript如下点击文本框中的问题。






i use javascript as below to click problem in textbox.

<script type="text/javascript">
        $(function () {
            // Setup drop down menu
            $('.dropdown-toggle').dropdown();

            // Fix input element click problem
            $('.dropdown input, .dropdown label,').click(function (e) {
                e.stopPropagation();
            });

        });
    </script>





但是当我点击btnLogin时,登录表格就会关闭。



请帮忙解决这个问题



谢谢。



But when i click on btnLogin then login form is closed.

pls help to solve this problem

Thanks.

推荐答案

function (){
// 设置下拉菜单


' 。dropdown-toggle' )。dropdown();

// 修复输入元素点击问题
('.dropdown-toggle').dropdown(); // Fix input element click problem


' 。dropdown input,。dropdown label,').click( function (e){
e.stopPropagation();
});

});
< / script>
('.dropdown input, .dropdown label,').click(function (e) { e.stopPropagation(); }); }); </script>





但是当我点击btnLogin时,登录表格就会关闭。



请帮忙解决这个问题



谢谢。



But when i click on btnLogin then login form is closed.

pls help to solve this problem

Thanks.


这篇关于将登录表单下拉到Bootstrap的Navbar按钮单击登录表单已关闭的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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