A1ien51's answer was on-track, but perhaps slightly more cryptic than I would have been.
Look where you're defining ansA:
var ansA = document.getElementById("answer1");
Then answer: what is ansA?
It's an HTML element.
Now, look at where you use it next:
ansD.value = val3 * 0.7 + ansA;
This assignment doesn't make sense. Read it:
To the element ansD, assign a value of val3 * 0.7 + an HTML element.
See it now?
EDIT: Doh! You beat me in answering your own post!