![]() |
What are some alternatives to document.write()?
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">Sincerely, Taro B. PS; This is not a calculator related problem, just in-general. |
Please make use of the search utility of this forum. If you type in “alternative document.write” you get a whole list of almost exactly the same question you asked.
|
innerHTML is the easy replacement for document.write that beginners should use. It does have a few limitations though so as you gain experience with javaScript you should look into the many Document Object Model commands that can manipulate the entire page content.
|
| All times are GMT +1. The time now is 10:46 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.