Advertisement
StefiIOE

linkovi

Feb 8th, 2020
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPEhtml>
  2. <html>
  3. <head>
  4.   <meta charset=utf-8/>
  5.   <title>Title</title>
  6. </head>
  7. <body>
  8. <p><a id="finki" type="text/html" hreflang="en-us" rel="nofollow" target="_self" href="http://www.w3resource.com/">finki</a></p>
  9.  
  10. <script>
  11.   function getAtributes()
  12.   {
  13.   var s = document.getElementById("finki").href;
  14.   console.log('The value of the href attributes of the link is' + s);
  15.   var t = document.getElementById("finki").hreflang;
  16.   console.log('The value of the hreflog attributes of the link is' + t);
  17.   var e = document.getElementById("finki").rel;
  18.     console.log('The value of the rel attributes of the link is' + e);
  19.   var f = document.getElementById("finki").target;
  20.     console.log('The value of the target attributes of the link is' + f);
  21.     var i = document.getElementById("finki").type;
  22.     console.log('The value of the type attributes of the link is' + i);
  23.   }
  24. </script>
  25. <button onclick="getAtributes()">Click here to get atributes value</button>
  26.  
  27. </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement