juqery 实现 防止当前页面重复点击,以减轻服务器压力

    <script>
        //防止当前页面重复点击,以减轻服务器压力
        $(document).ready(function () {
            var current_url = location.pathname;
            $("a").each(function () {
                if (current_url == $(this).attr("href")) {
                    $(this).click(function () { return false; });
                    $(this).dblclick(function () { return false; });
                }
            });
            //alert(current_url)
        });
    </script>

juqery 实现 防止当前页面重复点击,以减轻服务器压力  演示地址:http://ade.chinacloudsites.cn/

原文地址:https://www.cnblogs.com/webenh/p/6032206.html