SyntaxFix
Write A Post
Hire A Developer
Questions
You can modify the id without having to use getElementById
id
getElementById
Example:
<div id = 'One' onclick = "One.id = 'Two'; return false;">One</div>
You can see it here: http://jsbin.com/elikaj/1/
Tested with Mozilla Firefox 22 and Google Chrome 60.0