Mega Code Archive

 
Categories / JavaScript DHTML / Development
 

Output BR with Javascript

<?xml version"1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>   <head>     <title>JavaScript while statement</title>     <script type="text/javascript">       var iCount = 0;       var sNewLine = "<br />";       document.write("While loop is starting");       document.write(sNewLine);       while(iCount < 10){         document.write("iCount = " + iCount);         document.write(sNewLine);         iCount++;       }       document.write("While loop completed");     </script>   </head>   <body>   </body> </html>