0
html_string "<span class=\"verse\"><strong>1<\/strong>\u00a0hello world how are you?,<span class=\"trans\" title=\"\u00a0Greek brothers.\">t<\/span> I am fine thank you.<\/span><span class=\"verse\"><strong>2<\/strong>\u00a0this world is very bad.<\/span><span class=\"verse\"><strong>3<\/strong>\u00aall me are good,<\/span>"
我只是想提取其中具有类诗句跨度内的文本,它不应该包括与类反式从跨度文本。提取文本使用jQuery
结果必须是数组形式。
从上面的字符串我得导致这样
["\u00a0hello world how are you? I am fine thank you","\u00a0this world is very bad.","\u00aall me are good,"]
感谢
和强制性演示:http://jsfiddle.net/rWYzb/ – 2012-04-11 02:24:30