You probably need to convert the values to numbers before adding them together, try something like:
function add()
{
var i=0;
i=document.one.first.value + 0 + document.one.second.value;
document.write(i);
} The 0 in there should make the whole expression into a numeric one (I think).