例如,我有以下代码:
<table class="catsTable" width="100%" cellspacing="1" cellpadding="0" border="0">
<tbody><tr>
<td style="width:25%" class="catsTd" id="cid5" valign="top">
<a href="/load/prison_break_online/sezonul_1/5" >Sezonul 1</a> <span class="catNumData" style="unicode-bidi:embed;">[6]</span>
</td>
<td style="width:25%" class="catsTd" id="cid6" valign="top"><a href="/prison_break_online/sezonul_2/6" class="catName">Sezonul 2</a> <span class="catNumData" style="unicode-bidi:embed;">[0]</span></td>
<td style="width:25%" class="catsTd" id="cid7" valign="top"><a href="/prison_break_online/sezonul_3/7" class="catName">Sezonul 3</a> <span class="catNumData" style="unicode-bidi:embed;">[0]</span></td>
<td style="width:25%" class="catsTd" id="cid8" valign="top"><a href="/prison_break_online/sezonul_4/8" class="catName">Sezonul 4</a> <span class="catNumData" style="unicode-bidi:embed;">[0]</span></td>
</tr></tbody>
</table>
我想改变这个:
<a href="/load/prison_break_online/sezonul_1/5" >Sezonul 1</a> <span class="catNumData" style="unicode-bidi:embed;">[6]</span>
变成类似的东西:
<img src="/images/pris5.png"> <br>
<a href="/load/prison_break_online/sezonul_1/5" >Sezonul 1</a> <span class="catNumData" style="unicode-bidi:embed;">[6]</span>
pris5.png
== 来自系列 jail_break_online (pris) 的前 4 个字母和系列 sezonul_1/5(5) 的 ID .. 我通过下一个公式得到 ID => .. 如果来自 url <10 的最后 2 个字符 => 从 url 获取最后一个字符从 url 获取最后 2 个字符)