Skip navigation
Currently Being Moderated

script defer in IE6

Apr 10, 2012 2:15 AM

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>

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points