我如何才能找到img
标签,并使用jQuery替换为span
标签?查找img标签并用另一个标签替换
<style>
.box{
display:inline-block;
width:100px;
height:20px;
line-height:20px;
font-size:11px;
}
</style>
<p id="recommend">
<img src="search.gif" alt="find"> <!-- find this img tag without id and class-->
</p>
<!-- next -->
<p id="recommend">
<span class="box">search</span><!-- replace this -->
</p>
'ID =“建议”'应该是唯一.... –
我具有改进的代码块,除去由于笔记的格式由于不需要它,移动的问题的描述是代码块的上方和重新标题和内容。由于存在标签,我也从标题中删除了库名称,因为它不是必需的。 – Harry