अवलोकन
JavaScript में लिंक के href एट्रिब्यूट का मान प्राप्त करने के लिए href प्रॉपर्टी का उपयोग करें। यह लिंक किए गए दस्तावेज़ का URL देता है।
उदाहरण
<!DOCTYPE html> <html> <body> <p><a id="anchorid" href="https://www.qries.com/">Qries</a></p> <script> var myLink = document.getElementById("anchorid").href; document.write("Link: "+myLink); </script> </body> </html>