JavaScript에서 링크의 target 속성 값을 검색하려면 target 재산. 다음 코드를 실행하여 target 속성의 값을 얻을 수 있습니다.
예시
<!DOCTYPE html>
<html>
<body>
<p><a id = "qriesid" target="_self" href = "https://qries.com/" type = "text/html" >Qries</a></p>
<script>
var x = document.getElementById("qriesid").target;
document.write("Value of the target attribute: "+x);
</script>
</body>
</html>