javascript - How can I search through the HTML source of an outside URL and return the results to my app? -


i trying search outside url content matching "title" , return results html page in background through javascript. have been using javascript , not found resources resolve query, maybe i'm asking wrong?

but search document :

var title = document.getelementsbyname("title"); 

the hard part connecting page , searching through html source code.

tia!

you can't content outside url unless server allows so. but, can server side. able content of url server. server must include header in response name access-control-allow-origin contains patterns/name of domain.

however, can server side anyway, unless blocked server.

you need develop solution in grab content outside url server. can php, node.js, c# etc. after receiving response external server, deliver in response browser using ajax or anything. can play anyway want using javascript or jquery.

important note:

make sure whatever trying access in anyway, allowed so. if (your outside url) wants share public, must providing apis or other solutions allow access content.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -