Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have HTML.

<body>
    <span>
        <font="color">
          adfadf
          23423423423
          ORDER_NUMBER:
        </font>
    </span>
    <span>M123456JK98766</span>
</body>

M123456JK98766 is 14 digit number. Need to check only 14 digit character.

I like to find a order number M123456JK98766 from HTML. How can I retrieve that? that number can be changed every time by using page refresh.

I have no option to add id against M123456JK98766.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
979 views
Welcome To Ask or Share your Answers For Others

1 Answer

var orderNumber = $('span:contains("ORDER_NUMBER")').next().text();

test it here : http://jsfiddle.net/GmENT/4/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...