জাভাস্ক্রিপ্টে লিংকের 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>