ITeye博客

通过javascript设置CSS辅助类

fkshl · 2012-08-12 10:04 · Web前端 · Markdown


var css = {};
css.util = {
	setStyle : function(el, prop, val) {
		document.getElementById(el[i]).style[prop] = val
	},
	setCss : function(el, style) {
		for ( var prop in style) {
			if (!style.hasOwnProperty(prop))
				continue;
			css.util.setStyle(el, prop, style[prop]);
		}
	}
}

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。