Script for selecting text underneath an image?

Discussion in 'JavaScript' started by gravestmor, Mar 19, 2008.

  1. #1
    Hi,

    I am working a website where I would like to have a semi-transparent png image in a div tiling over the top of the entire page.

    But I would also like text that is beneath the image to be visible.
    I have set up an (extremely ugly) test page showing what I would like to achieve here:

    http://darch.com.au/test

    and I was wondering if this was possible using javascript.

    any help or advice would be much appreciated.
     
    gravestmor, Mar 19, 2008 IP
  2. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    #2
    If the text is in some html element and got an id assigned to it then you can easily do it like this.

    
    
    var text = document.getElementById('THEID').innerHTML;
    
    
    Code (markup):
    or similar.

    HOpe it helps
     
    stephan2307, Mar 20, 2008 IP