My code:\[code\]<div id="box"><p> 123</p><p> abc</p></div><script> var html = document.getElementById("box").innerHTML; alert(html) //you can the different HTMLString between IE6/7/8 and IE9/FF for (var i = 0, len = html.length; i < len; i++) { var word = html.charAt(i) if(i == 0){ alert(word=="\n") // IE6/7/8: false . IE9/FF:true } if(i == 11){ alert(word=="\n") //Look at here in IE6/7/8, why is false ?????? } }</script>\[/code\]when (i==11),the char of here in IE6/7/8 is chaning new line,but why shows false?how to write I could know the code of html is changing a new line in IE6/7/8??