简体   繁体   中英

$('html').append() doesn't work on IE7

I need to insert a div in the DOM after the "html" tag. It works on all browser except in IE7.

After several test, it looks like i can't access to the html element with IE7.

For example :

$('html').append('mycontent'); //works with all browser except IE

Someone have an idea of how I can bypassing this IE7 limitation ?

Thank you.

ps: I test on IE9 in IE7 mode

<html> is the root element. Aside from the DOCTYPE, there should be NO nodes outside it, and it should contain only TWO nodes, <head> and <body> . You should append new nodes to the <body> , maybe to the <head> if relevant, but never to the <html> itself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM