Just to build on top of the code from the previous post. This time, there is a page on a Web Forms application with a text that needs to be eliminated, but we no longer have the ability to re-compile. Fortunately, the change is cosmetic so we can resort to using plain vanilla JavaScript to solve this. Again, the provided HTML, although it was from a real legacy application, it has been cut … [Read more...]
How to Get HTML Elements with textContent in JavaScript
This is a short instruction on how to identify an HTML element based on a specific string that can be searched using textContent property. It's best to demonstrate the method with an example. Using the HTML page below, we are going to search for a text "Search This!" and select the whole row and change the background color to maroon. First of all, we are going to create a simple page using … [Read more...]