Mel wrote:
> i use the following to add a line. how can i delete the last line ?
>
> oDiv = document.getElementById("MyDiv");
> oDiv.innerHTML = oDiv.innerHTML + string;
>
>
The innerHTML method "specifies or receives the content between
the start and end tags" of an element.
<URL:http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/innerhtml.asp>
// content (text & all markup) replaced by ''
// which effectively means deleted
oDiv.innerHTML = '';
// contents replaced by the value of 'string'
oDiv.innerHTML = string;
// contents replaced by text & markup
oDiv.innerHTML = "Here is a <b>bold</b> word";
--
Rob
|