我正在为自己创建一个简单的博客脚本,但我卡在了某个地方。
我怎样才能只显示 2 p 标签?
IE
我的文字:
<p>Some text, article here. this is the first paragraph</p>
<p>Some text, article here. this is the second paragraph</p>
<p>Some text, article here. this is the third paragraph</p>
<p>Some text, article here. this is the fourth paragraph</p>
我怎样才能让它只返回前 2 段?
像这样:
<p>Some text, article here. this is the first paragraph</p>
<p>Some text, article here. this is the second paragraph</p>
<a href="dont-worry-about-the-link">Read More</a>