Re: How to insert a new row to an existing HTML table





Stefan Mueller wrote:


xelement.setAttribute("class", "style_button")

The class attribute is scripted as the property className e.g.
xlement.className = 'style_button';
That is one of the few exceptions and was done because 'class' is a keyword or reserved word in many programming languages.


xelement.setAttribute("onMouseover", "className = 'style_button_mouseover'")

Within HTML documents you can usually script HTML event handlers as elementObject.oneventname = expressionYieldingAFunctionObject; e.g. xelement.onmouseover = function (evt) { this.className = 'style_button_mouseover'; }



--

	Martin Honnen
	http://JavaScript.FAQTs.com/
.


Loading