就像这样:
this.token = document.getElementById("token").getAttribute("content");
更好的是,获取元元素by Name
by Name
发布于 2015-07-08 17:57:46
试试这个:
document.querySelector('meta[name="name"]').getAttribute("content");
https://stackoverflow.com/questions/31300015
相似问题