Javascript examples for jQuery:Link
Get the URL address of the link.
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ console.log($("a").attr("href")); });/*w ww. jav a 2s. c o m*/ </script> </head> <body> <a href="http://java2s.com/">W3Schools</a> </body> </html>