<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<script>
i=false;
window.onload = function() {
document.getElementById('b').onclick = function() {
if (i===false) i = parseFloat(document.getElementById('fi').value);
if(isNaN(i)) return;
var inp = document.createElement('input');
inp.value = ++i;
inp.type="text";
document.body.insertBefore(inp,this);
}
}
</script>
</head><body>
<input type="text" id="fi">
<input type="button" id="b" value="+">
</body></html>