HTL element attributes dynamic assignment

Suppose I have the following HTML code:\[code\]<HTML> <BODY> <FORM> <div name="container" id="setup"> <div name="element 1" id="element 1"> <input type="button" value="http://stackoverflow.com/questions/15858319/xxx" name="button 1" /> </div> </div> </FORM> </BODY></HTML>\[/code\]And I would like to achieve the following:Assign the button value whatever the parent node id is ("element 1" in this case) instead of static "xxx". Is it possible?Thanks
 
Top