比如页面
http://ss.sysu.edu.cn/InformationSystem/ (注意最后的 / )
http://ss.sysu.edu.cn/InformationSystem/ArticleList.aspx?id=36
里面有<a href="Article.aspx?id=6052">
如何获得该<a> 的绝对路径呢? http://ss.sysu.edu.cn/InformationSystem/Article.aspx?id=6052
URL url = new URL("http://ss.sysu.edu.cn/InformationSystem/");
String href = "Article.aspx?id=6052";
URL url2 = new URL(url,href);
System.out.println(url2.toString())// 即可得到绝对路径