D
D
de_iiah_teji9_iiace2017-09-06 11:06:31
JavaScript
de_iiah_teji9_iiace, 2017-09-06 11:06:31

Replacing part of html with javascript?

Good afternoon, you need to change the page markup on the client side.
There are several classes that are displayed on the page, you need to push them into the table on the fly.
doing so

var x = document.getElementsByTagName("fieldset");

    for( i = 0; i <= x.length ; i++){
       x[i].innerHTML = "new tags"; 
    }

It finds elements but does not replace them, even if I try to simply delete them , it still does not work. In general, I want to go through these elements, delete them, and insert the same thing in their place, but already embedded in the table, maybe I'm not looking there at all? x[i].innerHTML = "";

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question