how can I know the code of HTML is making a new line? [closed]

fodder

New Member
My code:\[code\]<div id="box"> <p> 123 </p> <p> abc </p></div><script> var html = document.getElementById("box").innerHTML; for (var i = 0, len = html.length; i < len; i++) { var word = html.charAt(i) alert("_" + word + "_" + i) //Attention!! when the "i" == 0 if (i == 0) { alert(word==" ") // it is false..... } }</script>\[/code\]Using API : "chatAt" ,how to write I could know the code of HTML is changing new lines.....(word == what????)
 
Back
Top