我无法从元标记中检索信息.我试图从一个网站上获得一个img src并且无法弄明白.这是我想要做的一个例子.
<meta property="og:image" content="http://foo.jpg">
var image = document.querySelector('meta[property="og:image"]').getAttribute('content');
Run Code Online (Sandbox Code Playgroud)
我试过这个,但它不起作用.有任何想法吗?