我试图提取两句了一堆段落,而我坚持......基本上,段落是这样的:如何用jQuery提取单个句子?
<p class="some_paragraph">This is a sentence. Here comes another sentence. A third sentence.</p>
<p class="some_paragraph">Another sentence here. Interesting information. Very interesting.</p>
<p class="some_paragraph">This is a sentence. Here comes another sentence. A third sentence.</p>
我需要做的,就是找两个'这三段中所有9个句子中最短的句子。两个提取的句子必须放入以下跨度:
<span class="span1">Shortest sentence comes here</span>
<span class="span2">Second shortest sentence comes here</span>
我该怎么做?
这只是一个基本的想法 –
似乎不起作用http://jsfiddle.net/mVrf你/我错过了什么? –
你错过了jquery =)) –