Generate hyperlinks with the same id - Javascript jQuery

Javascript examples for jQuery:Link

Description

Generate hyperlinks with the same id

Demo Code

ResultView the demo in separate window

<html lang="en">
   <head></head>
   <body translate="no"> 
      <a id="one">One</a> 
      <a id="one">Two</a> 
      <a id="one">Three</a> 
      <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> 
      <script>
document.write(document.querySelectorAll("[id=one]").length);
    //from  ww  w  .j  a v  a  2 s  .  c  o  m
      </script>  
   </body>
</html>

Related Tutorials