IE6/7/8用Js实现圆角(转载)

var css = document.creatStyleSheet();

css.addRule("v:\\roundrect","behavior:url(#default#vml);display:inline-block;");

var rect = document.creatElement("v:roundrect");

setAttribute(rect,{
 arcsize:"20px",
 stroked:false
});
rect.css({
 "20px",height:"20px",antialias:true
})

原文链接:http://news.cnblogs.com/n/88055/

数组去重:Array.prototype.distinct = function(){
    var self = this;
    var _a = this.concat().sort();
    _a.sort(function(a,b){
        if(a == b){
            var n = self.indexOf(a);
            self.splice(n,1);
        }
    });
    return self;
};

转自:http://www.uedmagazine.com/ued/comments.php?y=10&m=11&entry=entry101114-131904

原文地址:https://www.cnblogs.com/johnwonder/p/1934384.html