js动态创建DIV,去掉数组中重复值

$("a").mouseenter(function () {
                var setx = this.offsetLeft;
                var sety = this.offsetTop;
                //alert(setx + "," + sety);
                $("#showd").css({
                    'top': sety + 20 + 'px',
                    'left': setx + 50 + 'px',
                    'position': 'absolute',
                    'background': 'gray'
                }).show();
            });
            $("#showd").mouseout(function () {
                $(this).hide();
            });
            $("#showd").click(function () {
                alert("可以了");
            });
        });
   

转载于:https://www.cnblogs.com/fourw/archive/2013/05/19/3086766.html

你可能感兴趣的:(js动态创建DIV,去掉数组中重复值)