function Zoom(){ this._isInit = false; this._zoom = 1; this._zoom_w = 1; this._zoom_h = 1; this._w = 1440; this._h = 900; this._cw = window.screen.width; this._ch = window.screen.height; this._getZoom = function(){ if(!this._isInit){ this._init(); } return this._zoom; }; this._getZoom_w = function(){ if(!this._isInit){ this._init(); } return this._zoom_w; }; this._getZoom_h = function(){ if(!this._isInit){ this._init(); } return this._zoom_h; }; this._init = function(){ /* this._zoom = (this._cw/this._w>this._ch/this._h)?this._ch/this._h:this._cw/this._w; this._zoom_w = this._cw/this._w; this._zoom_h = this._ch/this._h;*/ }; } var _global_zoom = new Zoom(); function getZoom(){//图片所放值 if(_global_zoom == null){ _global_zoom = new Zoom(); } _global_zoom._getZoom(); } function getZoom_H(){//单纯高度缩放值 if(_global_zoom == null){ _global_zoom = new Zoom(); } _global_zoom._getZoom_h(); } function getZoom_W(){//宽度所放值 if(_global_zoom == null){ _global_zoom = new Zoom(); } _global_zoom._getZoom_w(); }