Test
child
I want to change the style of the child div
document.getElementById('child')
should return you the correct element - remember that id's need to be unique across a document to make it valid anyway.
edit : see this page - ids MUST be unique.
edit edit : alternate way to solve the problem :
Test
child
then you just need the test() function to look up the element by id that you passed in.