search part of the document

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bindueldo
    New Member
    • Mar 2008
    • 2

    search part of the document

    I need to search for a word only in part of the page.
    I gave that part in a <span> . span id is box_newBrick.

    var s = document.body.c reateTextRange ;
    s1 = s.findtext("OVE R");

    this works on the full page .

    How do I search for the same , only in the spand box_newBrick?

    thanks
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    If it's just within a span, use spanObj.innerHT ML.match(valueT oSearch).

    Comment

    • bindueldo
      New Member
      • Mar 2008
      • 2

      #3
      Thank you . It works.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        You're welcome. Post again if you have any more questions.

        Comment

        Working...