inner DIV not accessible using document.getElementById
see below html
<Div id="one">
<Div id="two">
<开发者_如何学C;/Div>
</Div>
when i am accessing div "two" with "document.getElementById("two")
...am getting null.
It worked for me.
<body onload="javascript:test();">
<Div id="one">
<Div id="two">
</Div>
</Div>
function test()
{
alert(document.getElementById("two"));
}
and I receive a messagebox which displays
[object]
精彩评论