-2

How could I change the value of id automatically, e.g. if I have

<div id = "email">

I would like to change it to <div id = "nick">?

1 Answers1

0

AutoReplaceHTML seems to be what you are looking for. If you would like further customization, you can use content scripts with JavaScript that searches for elements by id.

I'm not sure why you would want to do this, however. The id of an element is used to determine which CSS styles apply to it and can possibly be used in scripts (like the JavaScript getElementById() example I linked). Changing the id of an element could break the styling or produce an error in any of the attached scripts.