0

I thought I can only use 'href' attribute to link url in a tag but I found the following example.

<a data-link="https://stackoverflow.com/" style="cursor: pointer" class="custom-sub-controller" data-id="application27" data-pid="application">link</a>

Is it possible to link url with a tag using not 'href' but 'data-link' attribute?

Belle
  • 1
  • No. It's just data for JavaScript and other programming languages to play with. It doesn't have any intrinsic meaning. – Quentin Apr 12 '22 at 07:06
  • @Quentin Then how is it possible to connect to linked url? There are no 'href' attribute. It only has 'data-link' attribute. But it works. – Belle Apr 12 '22 at 08:43
  • Presumably some JS on the page uses that data. – Quentin Apr 12 '22 at 08:44
  • @Quentin Maybe you're right. Then I should find the function that use the data. But the thing is the code is not mine. Can I see all JS code on website using f12(developer mode) on chrome? – Belle Apr 12 '22 at 09:00

0 Answers0