【发布时间】:2012-01-03 05:32:27
【问题描述】:
您好,我正在尝试提取 href 在 html 行中定义的文本。例如:
<link rel="stylesheet" href="style.css" type="text/css">
我想获取“style.css”或者:
<a href="target0.html"><img align="center" src="thumbnails/image001.jpg" width="154" height="99">
我想得到“target0.html”
执行此操作的正确 Java 代码是什么?
【问题讨论】:
-
我认为这个问题的答案就是你要找的:stackoverflow.com/questions/1670593/…
-
强制 SO 链接:stackoverflow.com/questions/1732348 阅读投票最多的答案; )