Replace the contents of an HTML element (HTML + JavaScript)

Setting the value of innerHTML lets you easily replace the existing contents of an element with new content.

For example, you can erase the entire contents of a document by clearing the contents of the document’s body attribute:

document.body.innerHTML = "";

Replace the existing content of all the elements of the desired class with a new content:

<script>
    var i;

    for (i = 0; i < document.getElementsByClassName("button").length; i++) {

        if (document.getElementsByClassName('button')[i].innerHTML == 'Continue Reading →'){

        var yourHTML = 'MORE INFO / PHOTOS →';
        document.getElementsByClassName('button')[i].innerHTML = yourHTML;

        }
    }
</script>