javascript - .find Inquiry about how to find text -



javascript - .find Inquiry about how to find <a> text -

how find text on page under tag?

i tried this, didn't work:

var link = "http://www.roblox.com/my/groups.aspx?gid=34039" function her() { $.get(link, function (data) { if ($(data).find('no one!').length) { post() lol() } }) } her()

if retrieving info html can line below

// below illustration statement find anchors has no one! text var phrasetofind = "no one!"; //links contain above phrase example. var isanylinkwithphrasefound = $(data).find('a:contains('+ phrasetofind +')').length > 0;

your function alter below:

function her() { var phrase = "no one!"; $.get(link, function (data) { if ($(data).find('a:contains('+ phrase +')') .filter(function(){return $(this).text() === phrase }).length) { //this filter give links exact phrase post() lol() } }) }

javascript jquery post get

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -