This is my HTML
<td class="style1 product name" valign="top" nowrap>23$</td>,
<td style="padding-left:10px;" class="product name" width="85%">productY</td>
<td class="style1 product name" valign="top" nowrap>10$</td>,
<td style="padding-left:10px;" class="product name" width="85%">productX</td>
I tried the script below, but this is returning the full html.
document.getElementsByClassName("product name")
How can i make it work so that it would return productX and productY in an array?
please let me know thanks
.getElementsByClassNamereturns and using a conditional to push only elements you want to a new array.