我想基于HR标签拆分我从不同DIV中的Web服务收到的文章(= HTML内容).
我用一个例子解释,这是我从服务中收到的:
<p>This is an article bla bla</p> <hr/> <p>this is the next page of the article blabla ...</p>
Run Code Online (Sandbox Code Playgroud)
我想根据HR标签制作:
<div><p>This is an article bla bla</p></div>
<div><p>this is the next page of the article blabla ...</p></div>
Run Code Online (Sandbox Code Playgroud)
我尝试了不同的想法,但是没有用.我怎么能用Javascript或JQuery(或另一种方法;-))来做到这一点?