用javascript替换类名中的数字

时间:2012-09-03 09:41:52

标签: html regex

为什么我的剧本不起作用?

我想替换此代码中的数字:

<!--m-->
<li class="g videobox" style="position:relative">
<div class="s">
<table class="ts" style="width:auto">
<tbody>
<tr>
<td style="padding-top:5px;padding-right:8px" valign="top" width="1%">
<div class="th" style="background-color:#000;height:68px;overflow:hidden;position:relative;width:120px">
<a id="v0" style="text-decoration:none" href="/url?url=http://www.dailymotion.com/video/xt80kj_2nd-september-2012-southampton-vs-manchester-united-2-3-hd_sport&amp;rct=j&amp;sa=X&amp;ei=P2hEUIfkKYKk0QXppoHgCA&amp;ved=0CDwQuAIwAA&amp;q=manchester&amp;usg=AFQjCNGmLl3hg6CUcX5MsuU-njXolHOOlQ">
<div style="position:relative;top:0px;left:0px">
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCABDAHgDASIAAhEBAxEB/8QAGwAAAgMBAQEAAAAAAAAAAAAAAAUDBAYCBwH/xAA3EAACAQMDAgMGBQMDBQAAAAABAgMABBEFEiEGMRNBURQiYXGBkRUyocHRI0KxByUzUmKS4fD/xAAaAQACAwEBAAAAAAAAAAAAAAADBAACBQEG/8QALBEAAgIBAwIGAgAHAAAAAAAAAQIAAxEEEiExQQUTMlFhcRQiNEKBobHB8P/aAAwDAQACEQMRAD8A+a3Y2sWmQSEyBeeYYlyfuVq4uoWunJYTTQzPH4e0ZKBhkjuMZ+xpnf2Ek+hujAIV7B2C4/8AIUq1y1jfSLe3luY4PcCl/eYA+XCgg/enSgIDY7SunsFgFJPf/M0za6nsEVxBZnazbdsjtx8fM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SbthIUBQoH0FUdxx3oopCwncZq1ekTo0m6oA9hjP/fRRXU9YgPEP4R/qZaiiinZ4uWLNVczbgDiFiM+RxVeiipJPoODkUUUVJJ//2Q==" alt="" id="vidthumb1" class="th vidthumb1" style="display:inline-block;height:67px;margin:0px 0px 0px 0px;border:0;width:120px" align="middle" border="0" height="67" width="120">
</div>
<span class="vdur" style="right:0;background-color:#000;bottom:0;color:#000;filter:alpha(opacity=70);font-size:11px;font-weight:bold;opacity:0.7;-khtml-opacity:0.7;-moz-opacity:0.7;padding:1px 3px;position:absolute;text-align:right;text-decoration:none">►&nbsp;4:01</span>
<span class="vdur" style="right:0;bottom:0;color:#fff;font-size:11px;font-weight:bold;padding:1px 3px;position:absolute;text-align:right;text-decoration:none">►&nbsp;4:01</span>
</a>
</div>
</td>
<td style="padding-top:1px" valign="top">
<h3 class="r inl">
<a href="http://www.dailymotion.com/video/xt80kj_2nd-september-2012-southampton-vs-manchester-united-2-3-hd_sport" class="l" onmousedown="return rwt(this,'','0','','1','AFQjCNFZjowZj8K920o31HeauBkHuwmpzA','6LR8Li4Qt3qhz4xWQE49yQ','0CDsQtwIwAA',null,event)" title="2nd September 2012 Southampton vs Manchester United 2-3 [HD] - Video Dailymotion">2nd September 2012 Southampton vs <em>Manchester</em> <b>...</b>
</a>
</h3>
<div> <cite class="kv">dailymotion.com</cite>
<span class="st">
<span class="f">
<span style="background:#aaa;border:#999 1px solid;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;color:#fff;font-size:10px;font-weight:bold;margin-right:5px;padding:0 3px;text-transform:uppercase">New</span>
<span class="nobr">14 hours ago</span> - <span class="nobr">4 min</span>
</span>
<br>2nd September 2012 Southampton vs <em>Manchester</em> United 2-3 [HD]<br>
</span>
</div> </td>
</tr>
</tbody>
</table>
</div>
<!--n-->
<!--m-->
</li>
<li class="g videobox" style="position:relative">
<div class="s">
<table class="ts" style="width:auto">
<tbody>
<tr>
<td style="padding-top:5px;padding-right:8px" valign="top" width="1%">
<div class="th" style="background-color:#000;height:68px;overflow:hidden;position:relative;width:120px">
<a id="v0" style="text-decoration:none" href="/url?url=http://www.footytube.com/video/southampton-manchester-united-sep02-127801&amp;rct=j&amp;sa=X&amp;ei=P2hEUIfkKYKk0QXppoHgCA&amp;ved=0CD8QuAIwAQ&amp;q=manchester&amp;usg=AFQjCNGWDlz10zch_sUaWuQ63AO88LPtzA">
<div style="position:relative;top:-1px;left:0px">
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCABGAHgDASIAAhEBAxEB/8QAGwAAAgMBAQEAAAAAAAAAAAAAAAUDBAYBAgf/xAA1EAACAQMDAgQDBgYDAQAAAAABAgMABBEFEiETMQZBUWEicYEUMjORobEHFRYjQsFSU9Hw/8QAGQEAAgMBAAAAAAAAAAAAAAAAAgMAAQQF/8QAIxEAAgICAgICAwEAAAAAAAAAAAECEQMhEjETQSJhBCMyUf/aAAwDAQACEQMRAD8A+c3IWWCJQxXIQZYeuKd6HqMmmkxxuXiD4whxvfHmPQDH0qobGW4trV4+ngxruDk5J/1Vn+WTQxiW3IeR1V4yF8/P5+VL6OjJxn6PM1zLFenUGuVLg7mdO6/8uP2+dbTRk1BLaIS6jbXMDSN1muwjOwx/bMZUgj0PvWQ13T7zS0t4bk280d4wmE8RbCuByhB7dwfzpro/hy7R1LJBD8IuFfO4KqkZX2JGabCbXaETgpwu+jQS+INuTLYampCMVLLtJC8DAI7kdquWlqL+8tJZZru0LIrLCXUHjB2nae/HPzNK/wCJAKtpjh9mbeRSSe+cVQ8JB5PEtoxnkmi6a7FZvuAf/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piu7PiBIxkiuEEf5H5ZoGcj5jzqJAW/ZpPFyrssOB+Ge9LtAAGs2zEAndTDxf93T8/8AWaXeHxnV7fHk1Nf9oWutnnVUU6reHAz1n/eoo4MqZHISMdzVvVIY01G6kmY/isVQdzzVCWQzMMnAHYDypclTKIdTvorO0Z9oCL91R3Y1noLV0ni1bU76W2jYgp0eX9segpRrmoS3N/OjNtjjYqiD9T86nTUheRWUDFN1uCGRxnI7AkVphGkHGkaq31i3uLuWyjn6qcNEW43DA8vWr2zHlj60hvNLhnjsrqJhBcQhG3Jj4lyMj/ynszW6sWiuN8RAKtuHas+Rb0VI4yqT2rgUD7orz1It34gOe2CK7leDvznyyKVsA66DptlQPhNFDLhWBJ7HvRVoJIX2Vvm0gG5vwk/yPoKsBSg2hjz70UUTewjghGdxOTXtVCnI9v3ooqJ7IzR+LRuXTxnnpn/VLGH2Eb4/xc8N6UUU2fYBU3NI7OzEsTkk9zQVFFFIIYDxVbfZdXl2HiYdQD0z3/apdAv/ALPA1s8auhY7coMgtwcn60UVvj0EjWai3SuDDGQ+5Qz70A7DHHoavC2Zgro6N2OXjAIX0wOPaiik5G10WyuYJTlQ0QAG5m2ct6cduAccV5FtIpP9xPulfwh7UUUjk32CTAFYcZyADyaKKKAJH//Z" alt="" id="vidthumb2" class="th vidthumb2" style="display:inline-block;height:70px;margin:0px 0px 0px 0px;border:0;width:120px" align="middle" border="0" height="70" width="120">
</div>
<span class="vdur" style="right:0;background-color:#000;bottom:0;color:#000;filter:alpha(opacity=70);font-size:11px;font-weight:bold;opacity:0.7;-khtml-opacity:0.7;-moz-opacity:0.7;padding:1px 3px;position:absolute;text-align:right;text-decoration:none">►&nbsp;4:40</span>
<span class="vdur" style="right:0;bottom:0;color:#fff;font-size:11px;font-weight:bold;padding:1px 3px;position:absolute;text-align:right;text-decoration:none">►&nbsp;4:40</span>
</a>
</div>
</td>
<td style="padding-top:1px" valign="top">
<h3 class="r inl">
<a href="http://www.footytube.com/video/southampton-manchester-united-sep02-127801" class="l" onmousedown="return rwt(this,'','0','','2','AFQjCNE5svFiL4Af9K2TuhaGf4ydP-LjtQ','t7BFtngpHDrP_gEBAAj7eg','0CD4QtwIwAQ',null,event)" title="Southampton vs. Manchester United Video Highlights &amp; Interviews (02nd Sep 12)">Southampton vs. <em>Manchester</em> United Video <b>...</b>
</a>
</h3>
<div> <cite class="kv">footytube.com</cite>
<span class="st">
<span class="f">
<span style="background:#aaa;border:#999 1px solid;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;color:#fff;font-size:10px;font-weight:bold;margin-right:5px;padding:0 3px;text-transform:uppercase">New</span>
<span class="nobr">13 hours ago</span> - <span class="nobr">5 min</span>
</span>
<br>Southampton v <em>Manchester</em> United video highlights, results and news. Match  played on Sunday, Sep 02 2012 <b>...</b>
<br>
</span>
</div> </td>
</tr>
</tbody>
</table>
</div>
<!--n-->
<!--m-->
</li>
<li class="g videobox" style="position:relative">
<div class="s">
<table class="ts" style="width:auto">
<tbody>
<tr>
<td style="padding-top:5px;padding-right:8px" valign="top" width="1%">
<div class="th" style="background-color:#000;height:68px;overflow:hidden;position:relative;width:120px">
<a id="v0" style="text-decoration:none" href="/url?url=http://www.footytube.com/video/southampton-manchester-united-sep02-127812&amp;rct=j&amp;sa=X&amp;ei=P2hEUIfkKYKk0QXppoHgCA&amp;ved=0CEIQuAIwAg&amp;q=manchester&amp;usg=AFQjCNEBZOpSGbL3i-xMze45YxunEAhAag">
<div style="position:relative;top:-1px;left:0px">
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCABGAHgDASI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c+Su5B7iqO4ytHsrmFpI6iucalpb2CVY+NFFEgA6k+Z2Y7k/bVKO4wrzFXRrq5FeDjAw4OuoagflRRTTETPKmGW4t1zPMVuT0G1euPsDSqO2tO3iBPf0ooofc6ObFxKxbdaX4zjqFDolWKKKKEqCZ0//9k=" alt="" id="vidthumb3" class="th vidthumb3" style="display:inline-block;height:70px;margin:0px 0px 0px 0px;border:0;width:120px" align="middle" border="0" height="70" width="120">
</div>
<span class="vdur" style="right:0;background-color:#000;bottom:0;color:#000;filter:alpha(opacity=70);font-size:11px;font-weight:bold;opacity:0.7;-khtml-opacity:0.7;-moz-opacity:0.7;padding:1px 3px;position:absolute;text-align:right;text-decoration:none">►&nbsp;5:53</span>
<span class="vdur" style="right:0;bottom:0;color:#fff;font-size:11px;font-weight:bold;padding:1px 3px;position:absolute;text-align:right;text-decoration:none">

使用此代码:

var html = document.getElementsByTagName("tr")[0].getElementsByTagName("td")[1].innerHTML
html = html.replace( /2012/g, "???" );
document.getElementsByTagName("tr")[0].getElementsByTagName("td")[1].innerHTML =html;

在此代码中,我想将2012替换为????

但我想用???替换值中的每个数字?但不能替换网址中的数字。

这可能吗?

1 个答案:

答案 0 :(得分:0)

由于网址都在网址中使用斜杠-,您可以执行以下操作:

html = html.replace( /[^\-]2012/g, " ???" );