19 de julho de 2012

Javascript - Fazer o IE8 reconhecer tags HTML5

<!--[if lte IE 8]>
    <script type="text/javascript">    
    var html5Tags = new Array();
    html5Tags[0] = 'abbr';
    html5Tags[1] = 'article';
    html5Tags[2] = 'aside';
    html5Tags[3] = 'audio';
    html5Tags[4] = 'canvas';
    html5Tags[5] = 'details';
    html5Tags[6] = 'figcaption';
    html5Tags[7] = 'figure';
    html5Tags[8] = 'footer';
    html5Tags[9] = 'header';
    html5Tags[10] = 'mark';
    html5Tags[11] = 'meter';
    html5Tags[12] = 'nav';
    html5Tags[13] = 'output';
    html5Tags[14] = 'progress';
    html5Tags[15] = 'section';
    html5Tags[16] = 'summary';
    html5Tags[17] = 'time';
    html5Tags[18] = 'video';
    
    for(var i=0;i<html5Tags.length;i++) {
        // cria as os elementos
        document.createElement(html5Tags[i]);
    }
    </script>
<![endif]-->

Nenhum comentário:

Postar um comentário