I've made several attempts at getting this to work; all with no success.

HTML Code:
<DIV ID="output">
[temporary]
</DIV>
<SCRIPT language="JavaScript">
/* var TAG = "SPAN>" */
   var TAG = "PRE>" 
   var NEW_LINE = "\n"  
/* var NEW_LINE = "
" */    
   var temp = "one|two|three"
   var x = temp.split("|")
   document.getElementById("output").innerHTML = "<"+TAG
   for (var i = 0; i < x.length; i++) {
      document.getElementById("output").innerHTML += x[i] + NEW_LINE
   }
   document.getElementById("output").innerHTML += "</"+TAG    
</SCRIPT>
I'm trying to produce the following result page:

one
two
three

but haven't had success.

Perhaps you will see something that I am missing.

Thanks in advance for any help you may be able to provide.