Hello again,
I've continued to study and work on JavaScript. I've had some problems with the document.write() function. When I try to do a math problem, the whole content of the page clears out and only displays the solution. For example:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script type="text/javascript">
function jahava()
{
var h = 1
var r = 4
var t = 5
document.write(h += r += t)
}
</script>
</head>
<body>
<button OnClick="jahava()">Click Me!</button>
</body>
</html>
So If I put other content, like the button I was displaying (which I wanted to stay visible), the function would make them all disappear. I would again appreciate any help towards this matter.
Sincerely,
Taro B.
PS; This is not a calculator related problem, just in-general.