JavaScript에서 링크의 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>