How to search the value of the type attribute of a link in JavaScript?

HTMLJavascriptProgramming Scripts

To search the value of the type attribute of a link in JavaScript, use the type property. You can try to run the following code to get the value of type attribute.

Example

<!DOCTYPE html>
<html>
   <body>
      <p><a id = "qriesid" href = "https://qries.com/" type="text/html" >Qries</a></p>
      <script>
         var x = document.getElementById("qriesid").type;
         document.write("Value of the type attribute: "+x);
      </script>
   </body>
</html>
raja
Published on 26-Feb-2018 17:53:30
Advertisements