जावास्क्रिप्ट में किसी लिंक की लक्ष्य विशेषता का मान खोजने के लिए, लक्ष्य . का उपयोग करें संपत्ति। लक्ष्य विशेषता का मान प्राप्त करने के लिए आप निम्न कोड चलाने का प्रयास कर सकते हैं।
उदाहरण
<!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>