通过jquery添加元标记? [英] Adding a meta tag via jquery?
问题描述
我需要在页面的head部分添加这个元标记,因为我需要强制IE7的页面。
I need to add this meta-tag in the head section of the page as i need the page to force IE7.
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
我使用DNN 5.6
I am using DNN 5.6
如何我可以这样做吗?
推荐答案
$('head')。append('< meta http -equiv =X-UA-Compatiblecontent =IE = EmulateIE7/>
');
虽然我不确定它是否会产生影响,因为它会在页面加载后生成
Though I'm not certain it will have an affect as it will be generated after the page is loaded
- 编辑 -
如果要为页面描述添加元数据标签,请使用DNN页面的
设置来添加描述和关键字。超过
,修改HEAD的最佳方法是动态
通过第三方模块将代码注入HEAD。
If you want to add meta data tags for page description, use the SETTINGS of your DNN page to add Description and Keywords. Beyond that, the best way to go when modifying the HEAD is to dynamically inject your code into the HEAD via a third party module.
发现于 http ://www.dotnetnuke.com/Resources/Forums/forumid/7/threadid/298385/scope/posts.aspx
这可能允许其他元标签,如果你很幸运
This may allow other meta tags, if you're lucky
- 编辑2 -
-- edit 2 --
其他HEAD标签可以放入页面设置>高级
设置>页眉标签。
Additional HEAD tags can be placed into Page Settings > Advanced Settings > Page Header Tags.
找到 http://www.dotnetnuke.com/Resources/Forums/ forumid / -1 / postid / 223250 / scope / posts.aspx
这篇关于通过jquery添加元标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!