【发布时间】:2013-02-16 07:25:19
【问题描述】:
我想在 html 代码中访问一个类
<id="main" class="cop">
<div class="body">
<table class="" summary="">
<colgroup class="game_title">//1
<col class="thumb">
<col class="game_title">//2
</colgroup>
<tbody class="">
<tr class="game">
<td class="thumb">
<a rel="nofollow" href=""><img src="" alt="Grudger thumbnail"></a>
</td>
<td class="game_title">//3
**<div class=**"game_title"**><a href="">Grudger</a></div>//I want to access this class only**
我用代码作为
Element INFORM = source.getElementById("main").getAllElementByclass("game_title");
用于访问具有元素 Gruger 的类 game_title
但这段代码无济于事。
【问题讨论】:
标签: java javascript html html-parsing