IE6/7/8用Js实现圆角(转载)
2011-01-13 11:20 爱研究源码的javaer 阅读(414) 评论(0) 编辑 收藏 举报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({
width:"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