Change html attributes of elements in code? |
Post Reply |
Author | ||
alnes
Newbie Joined: May 27 2021 Status: Offline Points: 11 |
Post Options
Thanks(0)
Posted: May 29 2021 at 1:19pm |
|
Hello, I need this for my Java Framework. I need to add something like "wicket:id="container01" in the div tag. thanks alnes
|
||
Hobby001
Admin Group Joined: Jun 05 2018 Location: Canada, Québec Status: Offline Points: 6195 |
Post Options
Thanks(0)
|
|
You can add any of the standard attribute https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes using javascript functions.
|
||
alnes
Newbie Joined: May 27 2021 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
|
Hm but i cant select an element and edit his div tag with own attributes ?
|
||
Hobby001
Admin Group Joined: Jun 05 2018 Location: Canada, Québec Status: Offline Points: 6195 |
Post Options
Thanks(0)
|
|
If you edit an element out of openelement (with a text editor) it will ve overwritten by openelement.
What are you trying to di precisely?
|
||
alnes
Newbie Joined: May 27 2021 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
|
I use a Java Framework Apache Wicket. And i need to modify html tags for this:
<button class="btn">Neue Kategorie anlegen</button> -> <button wicket:id="newCategory" class="btn">Neue Kategorie anlegen</button>
|
||
Hobby001
Admin Group Joined: Jun 05 2018 Location: Canada, Québec Status: Offline Points: 6195 |
Post Options
Thanks(0)
|
|
I don't know if it will fullfill your needs but the following function seems to be working
I added it on a test page
Edited by Hobby001 - May 29 2021 at 7:29pm |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |