It's the call to document.write
that is replacing the page. Remove it:
var theNumber=parseFloat(document.getElementById('theInput').value);
When you want the value of a variable, you shouldn't use document.getElementById
:
var doubleNumber = theNumber * 2;
innerHTML
is a property, not a method:
document.getElementById('theDiv').innerHTML = doubleNumber;