Add onsubmit="return functionName()" to the forms opening tag and at the end of the function add return false
<script type="text/javascript">
function functionName(){
alert("This is the value you have entered in the text box\n\n"+document.forms["f1"]["t1"].value)
return false
}
</script>
<form name="f1" onsubmit="return functionName()">
<input type="text" value="" name="t1">
</form>