hak wrote:
How I can use the id in javascript to get an information or to populate
the text control
exemple <input type="text" id=1 name="name" value=""/>
First you use valid (X)HTML.
If you are using HTML, you shouldn't have that "/" in there.
In you are using XHTML then you must quote all your attribute values.
Either way, id="1" isn't valid, because ids must begin with a letter.
Then you use DOM.
document.getElementById('value-of-id-attribute')
will return a reference to the element. Then you can access whatever
properties of it you like, such as the value.
--
David Dorward <http://dorward.me.uk/>