I don’t know if it is possible! Maybe my thought is also wrong. I want to invoke a search corresponding to all links in my WordPress blog.
I am using an Ajax call for my other search in this site. How can I retrieve a linking text from hypertext tag in html.
eg: <a href='www.example.com'>demo</a>.here i want to get ‘demo‘ as input.
Thanks.
Try this:
What the
searchfunction does is it loops through the list of strings and if any have thetermin it (indexOf), then it will get pushed into an array which is then returned. If there are no matches, it will returnnull.