S
soyo
I have the following code:
<a id="check" href=# onClick="script1();"><input
type=button.......></a>
Now to this script1() function above I want to pass the "id" of the
anchor tag so that I can access the child elements in my javascript
function script1()
the way I do now is:
<a id="check" href=# onClick="script1(id);"><input
type=button.......></a>
script1(id)
{
document.getElementById(id).firstChild;
}
but it says "id" undefined.
how do I do that?
can u also show me how to access the child nodes in the javascript
code.
<a id="check" href=# onClick="script1();"><input
type=button.......></a>
Now to this script1() function above I want to pass the "id" of the
anchor tag so that I can access the child elements in my javascript
function script1()
the way I do now is:
<a id="check" href=# onClick="script1(id);"><input
type=button.......></a>
script1(id)
{
document.getElementById(id).firstChild;
}
but it says "id" undefined.
how do I do that?
can u also show me how to access the child nodes in the javascript
code.