首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web开发 >

高手如何出去商品的名字详细内容如上

2012-08-13 
高手求助怎么出去商品的名字详细内容如下怎么将strong/srrong中间的内容去掉Nike Air Max::Nike Air M

高手求助怎么出去商品的名字详细内容如下
怎么将<strong></srrong>中间的内容去掉

Nike Air Max:: Nike Air Max 09+90<strong>::Blue Nike Air Max 09+90 Mens 0001</strong>
Nike Air Max:: Nike Air Max 09+90<strong>::Nike White Air Max 09+90 Mens 0002</strong>
Nike Air Max:: Nike Air Max 09+90<strong>::Blue Nike Air Max 09+90 Mens 0003</strong>
Nike Air Max:: Nike Air Max 09+90
Nike Air Max
Nike Air Max:: Nike Air Max 09+90<strong>::Nike Green Air Max 09+90 Mens 0006</strong>
Nike Air Max:: Nike Air Max 09+90<strong>::Nike Grey Air Max 09+90 Mens 0007</strong>
Nike Air Max:: Nike Air Max 09+90<strong>::Nike Orange Air Max 09+90 Mens 0008</strong>
Nike Air Max:: Nike Air Max 09+90<strong>::Nike White Air Max 09+90 Mens 0009</strong>
Nike Air Max:: Nike Air Max 09+90<strong>::Nike Black Air Max 09+90 Mens 0010</strong>
Nike Air Max:: Nike Air Max 24-7:: Air Max 24-7 Mens<strong>::Nike Yellow Air Max 24-7 Mens 0001</strong>
Nike Air Max:: Nike Air Max 24-7:: Air Max 24-7 Mens<strong>::Nike Red Air Max 24-7 Mens 0002</strong>
Nike Air Max:: Nike Air Max 24-7:: Air Max 24-7 Mens<strong>::White Nike Air Max 24-7 Mens 0003</strong>

[解决办法]

HTML code
<!DOCTYPE HTML><html lang=""><head>    <meta charset="gbk">    <title></title></head><body>    <div id="a">    Nike Air Max:: Nike Air Max 09+90<strong>::Blue Nike Air Max 09+90 Mens 0001</strong>Nike Air Max:: Nike Air Max 09+90<strong>::Nike White Air Max 09+90 Mens 0002</strong>Nike Air Max:: Nike Air Max 09+90<strong>::Blue Nike Air Max 09+90 Mens 0003</strong>Nike Air Max:: Nike Air Max 09+90Nike Air MaxNike Air Max:: Nike Air Max 09+90<strong>::Nike Green Air Max 09+90 Mens 0006</strong>Nike Air Max:: Nike Air Max 09+90<strong>::Nike Grey Air Max 09+90 Mens 0007</strong>Nike Air Max:: Nike Air Max 09+90<strong>::Nike Orange Air Max 09+90 Mens 0008</strong>Nike Air Max:: Nike Air Max 09+90<strong>::Nike White Air Max 09+90 Mens 0009</strong>Nike Air Max:: Nike Air Max 09+90<strong>::Nike Black Air Max 09+90 Mens 0010</strong>Nike Air Max:: Nike Air Max 24-7:: Air Max 24-7 Mens<strong>::Nike Yellow Air Max 24-7 Mens 0001</strong>Nike Air Max:: Nike Air Max 24-7:: Air Max 24-7 Mens<strong>::Nike Red Air Max 24-7 Mens 0002</strong>Nike Air Max:: Nike Air Max 24-7:: Air Max 24-7 Mens<strong>::White Nike Air Max 24-7 Mens 0003</strong>    </div>        <script>            var $ = function(id){                return document.getElementById(id);            };            var str = $('a').innerHTML;            var re = /<(strong).+?\/\1>/gi;            str = str.replace(re, '');            alert(str)        </script></body></html>
[解决办法]
HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><div id="demo">Nike Air Max:: Nike Air Max 09+90<strong>::Blue Nike Air Max 09+90 Mens 0001</strong>Nike Air Max:: Nike Air Max 09+90<strong>::Nike White Air Max 09+90 Mens 0002</strong>Nike Air Max:: Nike Air Max 09+90<strong>::Blue Nike Air Max 09+90 Mens 0003</strong>Nike Air Max:: Nike Air Max 09+90Nike Air MaxNike Air Max:: Nike Air Max 09+90<strong>::Nike Green Air Max 09+90 Mens 0006</strong>Nike Air Max:: Nike Air Max 09+90<strong>::Nike Grey Air Max 09+90 Mens 0007</strong>Nike Air Max:: Nike Air Max 09+90<strong>::Nike Orange Air Max 09+90 Mens 0008</strong>Nike Air Max:: Nike Air Max 09+90<strong>::Nike White Air Max 09+90 Mens 0009</strong>Nike Air Max:: Nike Air Max 09+90<strong>::Nike Black Air Max 09+90 Mens 0010</strong>Nike Air Max:: Nike Air Max 24-7:: Air Max 24-7 Mens<strong>::Nike Yellow Air Max 24-7 Mens 0001</strong>Nike Air Max:: Nike Air Max 24-7:: Air Max 24-7 Mens<strong>::Nike Red Air Max 24-7 Mens 0002</strong>Nike Air Max:: Nike Air Max 24-7:: Air Max 24-7 Mens<strong>::White Nike Air Max 24-7 Mens 0003</strong></div><script type="text/javascript">var html = document.getElementById('demo').innerHTML;html = html.replace(/(<strong>[^<]+<\/strong>)/img, '');alert(html);</script></body></html> 

热点排行