How can i remove this <p> tag with all its content in javascript?
say i have this html code
<p class="classname">
<input name="commit" value="Get Value" type="submit"> <span>or Cancel</span>
</p>
Now i need to replace/remove it in javascript, does anyone know how i can remove it?
If you have to do it in plain javascript it’ll be painful because of Internet Explorer which doesn’t support getElementsByClassName() (maybe in newer version ?).
But if you can, use a library/framework like jQuery, prototype, dojo, etc..