Welcome to Questionaries, where you can ask questions and receive answers from other members of the community.

Let us know at info@questionaries.org

To write messages to the screen without using "document.write()" ?

5 like 0 dislike
Hello

To write messages to the screen without using "document.write()" ?

Please give me your feedback.....
asked 1 year ago by daneim (127,080 points)

1 Answer

2 like 0 dislike
 
Best answer
Changing the contents of an element is a much better solution. When the method showStatus is invoked it will change the content of the span.
...
function showStatus(message) {
var element = document.getElementById("mystatus");
element.textContent = message; //for Firefox
element.innerHTML = message; //for IE (why can't we all just get along?)
return true;
}
...
<span id="mystatus">Test. </span>
answered 1 year ago by marck_don (191,010 points)

Related questions

5 like 0 dislike
0 answers
7 like 0 dislike
1 answer
5 like 0 dislike
1 answer
5 like 0 dislike
1 answer