The <form> does not indicate an action attribute, so when you click the submit button, the browser submits the form to the current URL, which will look very much like a refreshing page.
If you want to run the unesi function when the user clicks the submit button and prevents the HTML form from being unesi , you need to slightly modify it:
<input type="submit" name="unos" value="Unesi i ispisi" onclick="unesi(); return false;">
return false prevents the form from submitting.
source share