Suppose that I have a text with this html markup:
<p id="myId">Some text <span>some other text</span></p>
How can I get the value of the id
when I right-click anywhere on the paragraph?
Update:
I'm just passing the value to a function, which I do not mention so as to not complicate it.