您的位置:首页 > Web前端 > JavaScript

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

2013-05-19 12:31 363 查看
$("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("可以了");

});

});

function getr() {

var fn = 1; //文件名称

var te = "2,3,4,1";

var temp = 0;

var tem = te.split(',');

$.each(tem, function (n, value) {

if (value == fn) {

temp = n;

}

});

tem.splice(temp, 1);

alert(tem);

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: