开发者

JSON - Return html

I need a request to be sent to an external website wit开发者_开发技巧h the html back. I then need to extract the text within <td></td>. I am completely new to JSON, and am unsure if it's possible to do this using ajax.

Please could someone point me in the right direction and/or give example code.


You can't directly make a request to an external site via JS and read HTML from it. It's forbidden by the same origin policy. Either the external site has to support you by offering something like JSONP or CORS (not supported by all browsers yet), or you'll have to proxy the request via your own server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜