Is it possible to generate html from JavaScript? For example, I have this:
<script type="text/javascript">
for (i=0; i<=length; i++)
{
//I want to display a <p> tag containing the value of i
}
</script>
So the generated html should look something like this if length = 5:
<p>0</p>
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>5</p>
Is it possible to do this?