0 Replies Latest reply: Apr 10, 2012 2:15 AM by iacnats RSS

    script defer in IE6

    iacnats Community Member

      I find stange behavior of IE6 on javascript defer attribute.

       

      load the following html file in IE6, the result is "<p>javascript code 2</p>". It's strange.

      If load in opera, chrome, firefox, It's OK.

       

      Anyone knows why?

       

      ___________________________________________________________________

       

       

      <html>

      <head>

      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-5" />

      </head>

      <body>

      <p> para a </p>

      <script language="JavaScript">

        document.write('<p>');

                document.write('javascript code 1');

                document.write('</p>');

      </script>

      <p> para b </p>

      <script language="JavaScript" defer>

        document.write('<p>');

                document.write('javascript code 2');

                document.write('</p>');

      </script>

      <p> para c </p>

      <script language="JavaScript">

        document.write('<p>');

                document.write('javascript code 3');

                document.write('</p>');

      </script>

      </body>

      </html>