日期:2014-05-17  浏览次数:20424 次

关于截取字符串
像如下这段字符串,想要获取每个img的src值并且存入数组去,然后把所有<img>元素去掉存入一个新的字符串变量去,如何做呢?
<h2 style="margin: 0px 0px 0px 21px; padding: 0px; font-size: 14px; color: rgb(51, 51, 51);">商品详情:</h2><p><strong>商品信息:</strong>&nbsp;温馨提示:海外直达,下单后预计10天到15天内发货。<br/><br/>原产地:中国 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;品牌:Ivanka Trump &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;商品名称:Ivanka Trump Allison系列 女款时尚精致灰金色链式挎包<br/><br/>尺寸:长x高x厚(cm):20.3x12.7x7.6<br/><br/>、一经售出,若无质量问题,不得退货.</p><p><img src="http://localhost:19714/code/ueditor/net/upload1/2014-01-12/b57c5bc7-c2ba-456c-b00d-950eaee3b622.jpg" style="float:none;" title="MGCP-ITR062-09-1.jpg"/></p><p><img src="http://localhost:19714/code/ueditor/net/upload1/2014-01-12/1539f257-4d04-447a-b197-d5ab9fbcb4d6.jpg" style="float:none;" title="MGCP-ITR062-09-2.jpg"/></p><p><br/></p>

------解决方案--------------------
-_-
------解决方案--------------------
-_-
------解决方案--------------------
-_-
------解决方案--------------------
恭喜解决,求楼主散分