Is there a function that gives the dom element to a Javascript function with Javascript and returns the Selector of that element in the relevant html as a string. Briefly, I want to do the process in the picture below without using Chrome dev tools. I looked inside the nodes but couldn't find a breakdown that gives the selector
Asked
Active
Viewed 32 times
0
-
No, I don't think there is a standard JS function which returns a selector for a given element. – evolutionxbox Jan 12 '22 at 08:09
-
1Does this answer your question? [javascript get element unique selector](https://stackoverflow.com/questions/42184322/javascript-get-element-unique-selector) – nullptr Jan 12 '22 at 08:10
-
@nullptr the url you posted solved my problem. thank you very much – Volkan Turhan Jan 12 '22 at 08:58