Fetch meta-tags from url only by jQuery

前端 未结 4 1588
时光说笑
时光说笑 2021-01-13 05:35

Now a lot of scripts to facebook-style fetching data from url, but all of them work only in combination of jQuery and PHP. Is it possible to fetch url only by jQuery?

<
4条回答
  •  甜味超标
    2021-01-13 06:36

    With filter works fine!

    You can try.

    $.get('http://www.guardian.co.uk/culture/2012/jun/21/jimmy-carr-apologises-error-tax', function(data) {
        $(data).filter('meta[name=adescription]').attr("content");
    });   
    

提交回复
热议问题