我想使用jQuery在我的网站标题中添加元标记。我怎么能这样做?
提前致谢。
答案 0 :(得分:0)
试试这个
<script type="text/javascript">
$(document).ready(function() {
$("head").append("<meta name=viewport content=width=400, initial-scale=0.45, minimum- scale=0.45/><link rel=apple-touch-icon href=/images/customIcon.png/><meta name=apple-mobile-web-app-capable content=no /><meta name=apple-mobile-web-app-status-bar-style content=black-translucent /><link rel=apple-touch-icon-precomposed href=/images/customIcon.png/> ");
});
答案 1 :(得分:-1)
<script type="text/javascript">
$(document).ready(function() {
$("meta[name='og:title']").attr('content', 'my new title');
});
</script>