Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPEhtml>
- <html>
- <head>
- <meta charset=utf-8/>
- <title>Title</title>
- </head>
- <body>
- <p><a id="finki" type="text/html" hreflang="en-us" rel="nofollow" target="_self" href="http://www.w3resource.com/">finki</a></p>
- <script>
- function getAtributes()
- {
- var s = document.getElementById("finki").href;
- console.log('The value of the href attributes of the link is' + s);
- var t = document.getElementById("finki").hreflang;
- console.log('The value of the hreflog attributes of the link is' + t);
- var e = document.getElementById("finki").rel;
- console.log('The value of the rel attributes of the link is' + e);
- var f = document.getElementById("finki").target;
- console.log('The value of the target attributes of the link is' + f);
- var i = document.getElementById("finki").type;
- console.log('The value of the type attributes of the link is' + i);
- }
- </script>
- <button onclick="getAtributes()">Click here to get atributes value</button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement