<!-- lang: js --> $("a").click(function(){ var url=$(this).attr("href"); alert(url); }) 转载于:https://my.oschina.net/u/210432/blog/123162