Skip to content
Advertisement

Get HTML Table Row by Value

I have a HTML Table:

JavaScript

I want to make a JS function that will find "Sam" in the first column and replace the second column with "Green"

JavaScript

This is a function based off another article, it find any word matching searchText in the table and replaces it with the replace string. What I want to do is filter only by the first column and then change the text in the second column of the found row.

JavaScript

Advertisement

Answer

Analyse that:

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement