Skip to content

46.[html]如何让 ie6,7,8,兼容 html5 的标签? #46

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
webVueBlog opened this issue Mar 15, 2020 · 1 comment
Open

46.[html]如何让 ie6,7,8,兼容 html5 的标签? #46

webVueBlog opened this issue Mar 15, 2020 · 1 comment
Labels
html html

Comments

@webVueBlog
Copy link
Member

我一直使用公司里的提供的 jqside 插件,里面就是把 html5 的标签放到字符 串,用字符串的 split 的方法变为数组,用 while 的方法,变量减减,用 dom 的 createElement 方法进行再 ie678 里创建标签。

 if( $.isIE678 )
{ 
Varhtml5="abbr,article,aside,audio,canvas,datalist,details,dialog,even tsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,prog ress,section,time,vid eo".split(','),
i = html5.length; 
while(i--) document.createElement(html5[i]); 
}
@webVueBlog webVueBlog added the html html label Mar 15, 2020
@webVueBlog
Copy link
Member Author

I've been using the jqside plugin provided by the company, which is to put html5 tags into character strings, turn them into arrays by using the split method of strings, use the while method, subtract variables, and use the createElement method of dom to create tags in ie678.

 if( $.isIE678 )
{ 
Varhtml5="abbr,article,aside,audio,canvas,datalist,details,dialog,even tsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,prog ress,section,time,vid eo".split(','),
i = html5.length; 
while(i--) document.createElement(html5[i]); 
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
html html
Projects
None yet
Development

No branches or pull requests

1 participant