Jump to content

How to replace a specific string present in HTML tags?


Recommended Posts

You can use document.getElementsByTagName to get all elements of a specific tag, and loop through them and use the innerHTML property to replace the content. The String.replace function will do that.https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...