내가 단락의 무리에서 두 문장을 추출하려고, 나는 ... 기본적으로, 단락은 다음과 같이 붙어 모양입니다 :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를 작동하지 않을 것
snt[1]
인 경우 내가 잃어버린거야? –누락 된 jquery =)) –