0

In the view I have a div with id=my_user_id, so for example:

<div id='5'></div>

There is a way to change this id for the next request? So when I reload the page I get a number choosed by me, and not my_user_id.

Thank you.

rod
  • 417
  • 6
  • 15
  • 1
    please post relevant code, where this html comes from ? – tan Nov 27 '17 at 05:27
  • my_user_id comes from backend, is simply the id number of logged user. I need to know if can I change it, obviously just in the view (the id of the div) – rod Nov 27 '17 at 05:29

1 Answers1

0

If you want to change your div'id try this one: document.getElementById("5").id = 'newId';

Gitesh Purbia
  • 1,054
  • 1
  • 11
  • 25