⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xbstyle-css.js

📁 jboss规则引擎
💻 JS
📖 第 1 页 / 共 2 页
字号:
        elmstyle = new xbStyle(elm);        position = elmstyle.getEffectiveValue('position');        if (position != '' && position != 'static')          yParent += elmstyle.getTop();      }      elm = elm.parentNode;    }  }    y -= yParent;  this.setTop(y);}    // xbStyle.getHeight()function cssStyleGetHeight(){  var display = this.getEffectiveValue('display');  var height = this.getEffectiveValue('height');  if (typeof(height) == 'number')  {     // Opera     return height;  }  if (height == '' || height == 'auto' || height.indexOf('%') != -1)  {    if (typeof(this.object.offsetHeight) == 'number')    {      height = this.object.offsetHeight + 'px';    }    else if (typeof(this.object.scrollHeight) == 'number')    {      height = this.object.scrollHeight + 'px';    }  }  if (height.indexOf('px') == -1)  {    xbDEBUG.dump('xbStyle.getHeight: Element ID=' + this.object.id + ' does not use pixels as units. height=' + height + ' Click Ok to continue, Cancel to Abort');    return 0;  }  height = xbToInt(height);  return height;}// xbStyle.setHeight()function cssStyleSetHeight(height){  if (typeof(this.styleObj.height) == 'number')    this.styleObj.height = height;  else    this.styleObj.height = height + 'px';}// xbStyle.getWidth()function cssStyleGetWidth(){  var display = this.getEffectiveValue('display');  var width = this.getEffectiveValue('width');  if (typeof(width) == 'number')  {     // note Opera 6 has a bug in width and offsetWidth where      // it returns the page width. Use clientWidth instead.     if (navigator.userAgent.indexOf('Opera') != -1)       return this.object.clientWidth;     else       return width;  }  if (width == '' || width == 'auto' || width.indexOf('%') != -1)  {    if (typeof(this.object.offsetWidth) == 'number')    {      width = this.object.offsetWidth + 'px';    }    else if (typeof(this.object.scrollHeight) == 'number')    {      width = this.object.scrollWidth + 'px';    }  }  if (width.indexOf('px') == -1)  {    xbDEBUG.dump('xbStyle.getWidth: Element ID=' + this.object.id + ' does not use pixels as units. width=' + width + ' Click Ok to continue, Cancel to Abort');    return 0;  }  width = xbToInt(width);  return width;}// xbStyle.setWidth()function cssStyleSetWidth(width){  if (typeof(this.styleObj.width) == 'number')    this.styleObj.width = width;  else    this.styleObj.width = width + 'px';}// xbStyle.getVisibility()function cssStyleGetVisibility(){  return this.getEffectiveValue('visibility');}// xbStyle.setVisibility()function cssStyleSetVisibility(visibility){  this.styleObj.visibility = visibility;}// xbStyle.getzIndex()function cssStyleGetzIndex(){  return xbToInt(this.getEffectiveValue('zIndex'));}// xbStyle.setzIndex()function cssStyleSetzIndex(zIndex){  this.styleObj.zIndex = zIndex;}// xbStyle.getBackgroundColor()function cssStyleGetBackgroundColor(){  return this.getEffectiveValue('backgroundColor');}// xbStyle.setBackgroundColor()function cssStyleSetBackgroundColor(color){  this.styleObj.backgroundColor = color;}// xbStyle.getColor()function cssStyleGetColor(){  return this.getEffectiveValue('color');}// xbStyle.setColor()function cssStyleSetColor(color){  this.styleObj.color = color;}// xbStyle.moveAbove()function xbStyleMoveAbove(cont){  this.setzIndex(cont.getzIndex()+1);}// xbStyle.moveBelow()function xbStyleMoveBelow(cont){  var zindex = cont.getzIndex() - 1;              this.setzIndex(zindex);}// xbStyle.moveBy()function xbStyleMoveBy(deltaX, deltaY){  this.moveTo(this.getLeft() + deltaX, this.getTop() + deltaY);}// xbStyle.moveTo()function xbStyleMoveTo(x, y){  this.setLeft(x);  this.setTop(y);}// xbStyle.moveToAbsolute()function xbStyleMoveToAbsolute(x, y){  this.setPageX(x);  this.setPageY(y);}// xbStyle.resizeBy()function xbStyleResizeBy(deltaX, deltaY){  this.setWidth( this.getWidth() + deltaX );  this.setHeight( this.getHeight() + deltaY );}// xbStyle.resizeTo()function xbStyleResizeTo(x, y){  this.setWidth(x);  this.setHeight(y);}// xbStyle.setInnerHTML()function xbSetInnerHTML(str){  if (typeof(this.object.innerHTML) != 'undefined')    this.object.innerHTML = str;}// Extensions to xbStyle that are not supported by Netscape Navigator 4// but that provide cross browser implementations of properties for // Mozilla, Gecko, Netscape 6.x and Opera// xbStyle.getBorderTopWidth()function cssStyleGetBorderTopWidth(){  return xbToInt(this.getEffectiveValue('borderTopWidth'));}// xbStyle.getBorderRightWidth()function cssStyleGetBorderRightWidth(){  return xbToInt(this.getEffectiveValue('borderRightWidth'));}// xbStyle.getBorderBottomWidth()function cssStyleGetBorderBottomWidth(){  return xbToInt(this.getEffectiveValue('borderBottomWidth'));}// xbStyle.getBorderLeftWidth()function cssStyleGetBorderLeftWidth(){  return xbToInt(this.getEffectiveValue('borderLeftWidth'));}// xbStyle.getMarginTop()function cssStyleGetMarginTop(){  return xbToInt(this.getEffectiveValue('marginTop'));}// xbStyle.getMarginRight()function cssStyleGetMarginRight(){  return xbToInt(this.getEffectiveValue('marginRight'));}// xbStyle.getMarginBottom()function cssStyleGetMarginBottom(){  return xbToInt(this.getEffectiveValue('marginBottom'));}// xbStyle.getMarginLeft()function cssStyleGetMarginLeft(){  return xbToInt(this.getEffectiveValue('marginLeft'));}// xbStyle.getPaddingTop()function cssStyleGetPaddingTop(){  return xbToInt(this.getEffectiveValue('paddingTop'));}// xbStyle.getPaddingRight()function cssStyleGetPaddingRight(){  return xbToInt(this.getEffectiveValue('paddingRight'));}// xbStyle.getPaddingBottom()function cssStyleGetPaddingBottom(){  return xbToInt(this.getEffectiveValue('paddingBottom'));}// xbStyle.getPaddingLeft()function cssStyleGetPaddingLeft(){  return xbToInt(this.getEffectiveValue('paddingLeft'));}// xbStyle.getClientWidth()function cssStyleGetClientWidth(){  return this.getWidth() + this.getPaddingLeft() + this.getPaddingRight();  /*  if (typeof(this.object.clientWidth) == 'number')    return this.object.clientWidth;  return null;    */}// xbStyle.getClientHeight()function cssStyleGetClientHeight(){  return this.getHeight() + this.getPaddingTop() + this.getPaddingBottom();  /*  if (typeof(this.object.clientHeight) == 'number')    return this.object.clientHeight;  return null;  */}xbStyle.prototype.getClip            = cssStyleGetClip;xbStyle.prototype.setClip            = cssStyleSetClip;  xbStyle.prototype.getClipTop         = cssStyleGetClipTop;xbStyle.prototype.setClipTop         = cssStyleSetClipTop;  xbStyle.prototype.getClipRight       = cssStyleGetClipRight;xbStyle.prototype.setClipRight       = cssStyleSetClipRight;  xbStyle.prototype.getClipBottom      = cssStyleGetClipBottom;xbStyle.prototype.setClipBottom      = cssStyleSetClipBottom;  xbStyle.prototype.getClipLeft        = cssStyleGetClipLeft;xbStyle.prototype.setClipLeft        = cssStyleSetClipLeft;  xbStyle.prototype.getClipWidth       = cssStyleGetClipWidth;xbStyle.prototype.setClipWidth       = cssStyleSetClipWidth;  xbStyle.prototype.getClipHeight      = cssStyleGetClipHeight;xbStyle.prototype.setClipHeight      = cssStyleSetClipHeight;  xbStyle.prototype.getLeft            = cssStyleGetLeft;xbStyle.prototype.setLeft            = cssStyleSetLeft;xbStyle.prototype.getTop             = cssStyleGetTop;xbStyle.prototype.setTop             = cssStyleSetTop;xbStyle.prototype.getPageX           = cssStyleGetPageX;xbStyle.prototype.setPageX           = cssStyleSetPageX;xbStyle.prototype.getPageY           = cssStyleGetPageY;xbStyle.prototype.setPageY           = cssStyleSetPageY;xbStyle.prototype.getVisibility      = cssStyleGetVisibility;xbStyle.prototype.setVisibility      = cssStyleSetVisibility;xbStyle.prototype.getzIndex          = cssStyleGetzIndex;xbStyle.prototype.setzIndex          = cssStyleSetzIndex;            xbStyle.prototype.getHeight          = cssStyleGetHeight;xbStyle.prototype.setHeight          = cssStyleSetHeight;xbStyle.prototype.getWidth           = cssStyleGetWidth;xbStyle.prototype.setWidth           = cssStyleSetWidth;xbStyle.prototype.getBackgroundColor = cssStyleGetBackgroundColor;xbStyle.prototype.setBackgroundColor = cssStyleSetBackgroundColor;xbStyle.prototype.getColor           = cssStyleGetColor;xbStyle.prototype.setColor           = cssStyleSetColor;xbStyle.prototype.setInnerHTML       = xbSetInnerHTML;xbStyle.prototype.getBorderTopWidth    = cssStyleGetBorderTopWidth;xbStyle.prototype.getBorderRightWidth  = cssStyleGetBorderRightWidth;xbStyle.prototype.getBorderBottomWidth = cssStyleGetBorderBottomWidth;xbStyle.prototype.getBorderLeftWidth   = cssStyleGetBorderLeftWidth;xbStyle.prototype.getMarginLeft        = cssStyleGetMarginLeft;xbStyle.prototype.getMarginTop         = cssStyleGetMarginTop;xbStyle.prototype.getMarginRight       = cssStyleGetMarginRight;xbStyle.prototype.getMarginBottom      = cssStyleGetMarginBottom;xbStyle.prototype.getMarginLeft        = cssStyleGetMarginLeft;xbStyle.prototype.getPaddingTop        = cssStyleGetPaddingTop;xbStyle.prototype.getPaddingRight      = cssStyleGetPaddingRight;xbStyle.prototype.getPaddingBottom     = cssStyleGetPaddingBottom;xbStyle.prototype.getPaddingLeft       = cssStyleGetPaddingLeft;xbStyle.prototype.getClientWidth       = cssStyleGetClientWidth;xbStyle.prototype.getClientHeight      = cssStyleGetClientHeight;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -