<meta name="apple-itunes-app" content="app-id=432274380" />
类似于这种meta信息,js/jquery应该如何获取?
如果我定义了
<meta name="seg-user" content="helloworld" />
我应该如何通过js/jquery获取?
谢谢,欢迎讨论。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
直接按照平常取DOM的方法来取不就好了么?不明白问题的题点在哪里诶……
document.querySelector('meta[name="seg-user"]').getAttribute('content')假如只有一个meta标签的笨办法
好像没人回答jquery的版本,会稍微简洁一点:
$("meta").eq(1).attr("http-equiv"), 想要什么取什么