N
Noa
Hi
I have a page that looks like that:
<form name="kuku1" action ="anotherpage.html" >
<input name="name">
<input name="kuku2">
</form>
As far as i know, "getAttribute" should return a string value of an
elements' attribute.
document.forms[0].getAttribute("action") indeed returns the string
"anotherpage.html"
document.forms[0].action will also return that string
However, document.forms[0].getAttribute("name") does not return the
string "kuku1", but it returns the first input object.
In a similar way , document.forms[0].getAttribute("kuku2") returns the
second input element, and not a null object (or an empty string) as i
would expect.
Is it a bug? is it a defined behavoiur?
And how can i get the name of the form ???
I have a page that looks like that:
<form name="kuku1" action ="anotherpage.html" >
<input name="name">
<input name="kuku2">
</form>
As far as i know, "getAttribute" should return a string value of an
elements' attribute.
document.forms[0].getAttribute("action") indeed returns the string
"anotherpage.html"
document.forms[0].action will also return that string
However, document.forms[0].getAttribute("name") does not return the
string "kuku1", but it returns the first input object.
In a similar way , document.forms[0].getAttribute("kuku2") returns the
second input element, and not a null object (or an empty string) as i
would expect.
Is it a bug? is it a defined behavoiur?
And how can i get the name of the form ???