Hello, I am learning javascript and I am doing a code that when I click on a tag p the existing content is modified by a textarea that I then modify for another text. I already achieved it
The code I used was
Function modificar(e) {
G = e.getattribute('id')
Documentos.getelementbyid(G).innerHTML = "< id ='cambio' textarea></textarea> y < onclick='modificar2' button>"
Función modificar() {
Var f = Documentos.getelementbyid('cambio')
Document.getelementbyid('G').innerHTML = f
Now how do I make the change permanent on the page?