<tr phrase_id="1" class="altRow">
<td style="padding:3px; vertical-align:top;"><input type="checkbox" value="1"></td>
<td class="phraseCode" style="padding:3px; vertical-align:top;">EUH 201/201A</td>
<td class="phraseText" style="padding:3px; vertical-align:top;">Contains lead. Should not be used on surfaces liable to be chewed or sucked by children. Warning! Contains lead.</td>
</tr>
The above code is extracted from a web page using F12 in chrome.In the above code there is a checkbox
which when clicked turns the whole row yellow.So I made a bookmarklet which will check that checkbox
,but it is not making the line yellow.here is my bookmarklet
javascript:(function(){var s = document.getElementsByClassName("phraseCode");for(i=0;i<s.length;i++){if(s[i].innerText=="EUH 201/201A"){s[i].parentNode.getElementsByTagName("input")[0].checked=true;break;}}})();
it checcks the checkbox but not updating the row to yellow.Why?can anyone explain me please?