删除不在特定类的p标记下的span标记的内容

时间:2013-01-24 21:02:23

标签: jquery html

我的代码如下:

<p data-longitude="0.000000" data-latitude="0.000000" class="row">
<span class="itemdate"></span>
<a data-longitude="0.000000" data-latitude="0.000000" row"="" href="http://akroncanton.craigslist.org/sls/  &lt;p class="> <span class="itemdate"></span>  </a><a href="http://akroncanton.craigslist.org/trd/3530243219.html">This Is Mine</a><span class="itemsep"> - </span>  <span class="itempn"><font size="-1"> (Akron, Beachwood Ohio)</font></span><span class="itempx"></span> <span title="lab" class="itemcg"> <small class="gc"><a href="/lab/">general labor</a></small></span></p>

.html">Project Manager
<span class="itemsep"> - </span>
<span class="itempn">
<font size="-1"> (Akron/Canton)</font>
</span>
<span class="itempx"></span>
<span class="itemcg" title="sls">
<small class="gc">
<a href="/sls/">sales</a>
</small>
</span>
<p></p>

<p data-longitude="0.000000" data-latitude="0.000000" class="row">
<span class="itemdate"></span>
<a href="http://akroncanton.craigslist.org/trp/3568810841.html">CDL Pre-trip inspection help</a>
<span class="itemsep"> - </span>
<span class="itempn"><font size="-1"> (Akron)</font></span>
<span class="itempx"></span>
<span title="trp" class="itemcg"> <small class="gc"><a href="/trp/">transportation</a></small></span>
</p>

我需要删除这部分:

.html">Project Manager
    <span class="itemsep"> - </span>
    <span class="itempn">
    <font size="-1"> (Akron/Canton)</font>
    </span>
    <span class="itempx"></span>
    <span class="itemcg" title="sls">
    <small class="gc">
    <a href="/sls/">sales</a>
    </small>
    </span>
    <p></p>

两个<p>标签之间,所有值(例如项目经理,(Akron / Canton),sls,sales)都是动态的。如何在加载页面时删除它?

0 个答案:

没有答案