Loading ...
Sorry, an error occurred while loading the content.

45827How to get elements from region?

Expand Messages
  • blp
    Mar 1, 2009
    • 0 Attachment

      The API document.elementFromPoint will give me a element by certain
      position. But I need a elements by certain region.
      For example:
      <!-- if this region is top:0, left:0, right: 50, bottom: 10 -->
      <div style="display:inline">ABCDEFGHIJKLMNOPQRSTUVWXYZ</div>
      <!-- This region would be top:0, left:40, right:60, bottom: 10 -->
      <div style="left: -10px">VVVV</div>

      I need a document.elementsFromRegion(0, 0, 50, 10), it will return 2

      How do I implement this API using YUI or native API? Or there is a
      existed one?

      Thank you very much.