如何在JavaScript中搜索链接的type属性的值?

要在JavaScript中搜索链接的type属性的值,请使用type属性。您可以尝试运行以下代码来获取type属性的值。

示例

<!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>