Results 1 to 4 of 4
Jun 4, 2007, 05:36 #1
- Join Date
- Oct 2005
- 0 Post(s)
- 0 Thread(s)
Using the DOM to write to page / label / div
var strInputSize = document.getElementById("inputSize").value;
strInputSize = strInputSize * 0.03937 + " inches";
var writeIt = document.getElementById("WriteCalculation");
writeIt.innerHTML = (strInputSize);
How do I write to a div or label or just plain text?
The Div id="WriteCalculation area I have set asid for this function, only briefly displays the calculated result, but then it disappears.
How do I get it to stay permanently?
I am realizing after some preliminary research that innerHTML is not officially part of any W3C DOM specification, is that true?
However, the case has been made that innerHTML is lightning fast compared to the DOM. http://www.quirksmode.org/dom/innerhtml.html
Last edited by danjojo; Jun 4, 2007 at 06:14.