79308938

Date: 2024-12-26 07:41:07
Score: 0.5
Natty:
Report link

tag a title="Click to select search operation." soper="eq" class="soptclass" colname="ipaddress">==</a

Access the Dom element and change its attribut colname and text contents as well using below code

        const elements = document.getElementsByTagName('a');

        // Loop through and find the desired tag by attribute
        for (const element of elements) {
            if (element.getAttribute('colname') === 'ipaddress') { 
                element.setAttribute('soper', 'eq'); // Changes the 'soper' attribute to 'ne'
                element.textContent = '==';
                break; // Stop after finding the target element
          }
        }
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Kamran Munir