This is my HTML code:
<head>
</head>
<body>
   LIMIT<input id='limit' name='' value='' class=''>
   <button id='go' class=''>GO</button>
   TOTAL<input id='total' name='' value='' class=''>
   <script src='js/limitfor.js'></script>
</body>
And this is my JavaScript:
document.getElementById('go').onclick = function () {
 var limit = document.getElementById('limit').value;
 limit = parseFloat(limit);
 total = 0;
 for (i=0; i<=limit ;i++) {
     total = total + i;        
 };
};
If I alert the total, I can see that the function works, but I need the total to be in the textbox rather than in a pop up alert.
 
     
     
     
     
    
