js get custom attribute

66

javascript get element by custom attribute -

document.querySelector("div[data-automation='something']")

Select element by custom attribute

Comments

Submit
0 Comments