开发者

Adding a meta tag via jquery?

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" />

I am using DNN 5.6

How can i do this?


$('head').append('<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> ');

Though I'm not certain it will have an affect as it will be generated after the page is loaded

-- edit --

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.

Found at http://www.dotnetnuke.com/Resources/Forums/forumid/7/threadid/298385/scope/posts.aspx

This may allow other meta tags, if you're lucky

-- edit 2 --

Additional HEAD tags can be placed into Page Settings > Advanced Settings > Page Header Tags.

Found at http://www.dotnetnuke.com/Resources/Forums/forumid/-1/postid/223250/scope/posts.aspx


There is really no use in adding <meta> headers after the page has loaded.

To force IE7 rendering, change the underlying HTML.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜