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

How to get elements from region?

Expand Messages
  • blp
    Hi, The API document.elementFromPoint will give me a element by certain position. But I need a elements by certain region. For example:
    Message 1 of 1 , Mar 1 7:45 PM
    • 0 Attachment
      Hi,

      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
      elements.

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

      Thank you very much.
    Your message has been successfully submitted and would be delivered to recipients shortly.