code: function(anchor) {
  
          var isNode = anchor.parentNode;
          var offset = isNode ? $(anchor).offset() : {
              left: anchor.pageX,
              top: anchor.pageY
          };
  
  
          anchor = isNode ? anchor : anchor.target;
          var ownerDocument = anchor.ownerDocument;
          var defaultView = ownerDocument.defaultView || ownerDocument.parentWindow;
  
          if (defaultView == window) { // IE <= 8 只能使用两个等于号
              return offset;
          }
  
          // {Element: Ifarme}
          var frameElement = defaultView.frameElement;
          var $ownerDocument = $(ownerDocument);
          var docLeft = $ownerDocument.scrollLeft();
          var docTop = $ownerDocument.scrollTop();
          var frameOffset = $(frameElement).offset();
          var frameLeft = frameOffset.left;
          var frameTop = frameOffset.top;
  
          return {
              left: offset.left + frameLeft - docLeft,
              top: offset.top + frameTop - docTop
          };
      }
docs: 获取元素相对于页面的位置（包括iframe内的元素） 暂时不支持两层以上的 iframe 套嵌