How to change the HTML element with Javascript?

First Question how to replace :

<a href='javascript:void(0);'>This text not Replace</a>

to

<h3>This text not Replace</h3>

Second how to insert after before Question:

<ul class="somecssone">
<li>
    <ul class="somecsstwo">
        <li><h3>Text</h3></li>
    </ul>
</li>
</ul>

to

<ul class="somecssone">
<li>
    <div class="newcssone">
        <div class="newcsstwo">
            <div class="newcssthree">
                <ul class="somecsstwo">
                    <li><h3>Text</h3></li>
                </ul>
            </div>
        </div>
    </div>
</li>
</ul>

Third how to remove:

<div class="somecssone">
    <div class="removethisdivclass">Hello</div>
</div>

to

<div class="somecssone">
    Hello
</div>

Anyone can help me, Thanks

Read more here: Javascript relpace Html


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: