document.getElementByIdContains?
- by johnshaddad
Hello
Is there, by any chance, a way to solve this problem:
I have elements that have IDs such as "x_y_z". The unique part is "x_y", thus there is no two items that have the same combination of x and y..
However, using getElementById won't work because when I do it I only have the "x" and "y" part and not the Z (think of Z as a random incremental counter).
Is there a way around this? So that when I have the "x" and "y" I say something like getElementByIdContains("x_y")?
Thanks!