title: Replacing text in an input box of a webpage (with defined ID)
body: <p>I am trying to fill up all the input fields of a webpage (having input IDs ending with txtValue) which are filled with the word ‘dog’ to be replaced with the word ‘cat’.
  I have tried this code, but it isn’t working. Kindly help me to solve this. Thank you in advance.</p>
  <pre><code>const ta = document.querySelectorAll(&quot;[id$='txtValue']&quot;);
  
  const str = ta.value.replace(&quot;dog&quot;,&quot;cat&quot;);
  ta.value = str
  console.log(ta.value,&quot;change to&quot; ,str)
  </code></pre>