One technique I have seen is to use innerHTML.
On the HTML page on which you want the results output, you define a span and give it a name. In this example, the span is named "output":
You could even put this span in a table.
document.getElementById('output').innerHTML = outputString;
(In this case, the output is a string variable named "outputString".)