test--构造函数写法
var obj = document.getElementById('setbg'); var smooth = new ImageSmooth(obj); //smooth.fuzzy(); /*背景模糊*/ function ImageSmooth(obj){ var elem,oldClass; elem = obj; oldClass = ( elem.className == '' ? '' : elem.className + ' ' ); this.fuzzy = function(){ elem.className = oldClass + 'blur'; } }