猿问

用Jsoup解析html的时候,getElementsByTag获取不到Element

<tr>

<td class="whitetext" width="10%">2015020743</td> 

<td class="whitetext" width="35%">操作系统教程.5版 / 费翔林,骆斌编著</td> 

<td class="whitetext" width="13%">2016-09-01</td> 

<td class="whitetext" width="13%"><font color="red">2016-10-02 </font></td> 

<td width="6%" align="center" class="whitetext">0</td> 

<td class="whitetext" width="15%">自科文献二室[2楼西部]</td> 

<td width="13%" align="center" class="whitetext">无</td> 

<td width="5%" height="35" class="whitetext">


<div id="2"> 

 <input title="renew" class="btn btn-success" type="button" value="续借" onclick="getInLib('2015020743','5F071A7E','2');" disabled> 

</div> 

<div id="2015020743"></div></td> 

</tr>


html是这个

Document doc = Jsoup.parse(html);

Elements eles = doc.getElementsByTag("td");

获取不到元素

Elements eles = doc.getElementsByClass("whitetext");

也获取不到

请问怎么解决


MYYA
浏览 1228回答 1
1回答
随时随地看视频慕课网APP

相关分类

Java
我要回答