The comment delimiters are unnecessary. So's the whole script block, actually. And why have you used an XHTML-style input tag for the button, but HTML-style for everything else? Also, the method and action attributes of <form> are required.
Code:
<form action="" method="post">
<p>Insert a number in each text space and click "submit."</p>
<input type="text">
<input type="text">
<input type="text">
<input type="text">
<input type="text">
<p id="total"></p>
<input type="button" value="Submit" onclick="
var total = 0,
e = document.forms[0].elements,
tmp = 0;
for(var i=0;i<e.length;i++) if(!isNaN(tmp = parseInt(e[i].value))) total += tmp;
document.getElementById('total').innerHTML = total;
">
</form>
/EDIT: John seems to have beaten me to it, but my code is shorter, so I'll leave it here so you can choose.
Bookmarks