meta部分
1.使用jquery获取meta的content值
var m = $("meta[property=og:url]");
alert(m.attr("content"));
2.使用javascript获取meta的content值
var fbAppIdContent = "";
for (var i = 0; i < metaTags.length; i++) {
if (metaTags[i].getAttribute("property") == "og:url") {
fbAppIdContent = metaTags[i].getAttribute("content");
break;
}
}
console.log(fbAppIdContent);
参考资料
http://stackoverflow.com/questions/3289302/can-i-get-a-meta-value-with-jquery-js
http://stackoverflow.com/questions/13451559/get-meta-attribute-content-by-selecting-property-attribute