Re: How to insert a new row to an existing HTML table
- From: Martin Honnen <mahotrash@xxxxxxxx>
- Date: Sun, 30 Oct 2005 19:14:42 +0100
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/ .
- References:
- How to insert a new row to an existing HTML table
- From: Stefan Mueller
- Re: How to insert a new row to an existing HTML table
- From: Martin Honnen
- Re: How to insert a new row to an existing HTML table
- From: Stefan Mueller
- How to insert a new row to an existing HTML table
- Prev by Date: Re: Javascript Best Practices Document v1.0
- Next by Date: Re: is there a way to reset link states
- Previous by thread: Re: How to insert a new row to an existing HTML table
- Next by thread: Re: How to insert a new row to an existing HTML table
- Index(es):
Loading