Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140734

why click actions in 'a' element works on active only in javascript?

$
0
0

'a' element works on active only

  • if I code a click function on element in javascript but it works on active state only not permanently
  • I tried to search in google but I can't get any description about it
  • I attached a code snippet for example:
document.querySelector('a').addEventListener('click',function(){
   //do something but its working on active state only
});

Viewing all articles
Browse latest Browse all 140734

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>