如何删除在IE中?
我有一些 javascript 代码可以删除不间断空格。 它在 IE 中不起作用,但在 Chrome/FF/Safari 中起作用。
不知道是否有人可以告诉我为什么......?
<table id="shelf">
<tr class="row_products">
<td> <!-- C5_5 --> some content...</td>
<td> <!-- C5_2 --> some content...</td>
<td> <!-- C5_3 --> some content...</td>
<td> <!-- C5_1 --> some content...</td>
<td> <!-- C5_6 --> some content...</td>
<td> <!-- C5_4 --> some content...</td>
</tr>
</table>
<script type="text/javascript">
document.getElementById("shelf").innerHTML = document.getElementById("shelf").innerHTML.replace(/ /g,"");
</script>
此代码紧接在 id 为 #shelf 的表格之后。我对软件输出的控制有限,因此需要删除不间断空格(因为它破坏了页面设计/外观)。
希望一切都清楚!非常感谢您的帮助!
I have some javascript code which removes non-breaking-space.
It doesn't work in IE, however it does work in Chrome/FF/Safari.
Wonder if someone can tell me why... ?
<table id="shelf">
<tr class="row_products">
<td> <!-- C5_5 --> some content...</td>
<td> <!-- C5_2 --> some content...</td>
<td> <!-- C5_3 --> some content...</td>
<td> <!-- C5_1 --> some content...</td>
<td> <!-- C5_6 --> some content...</td>
<td> <!-- C5_4 --> some content...</td>
</tr>
</table>
<script type="text/javascript">
document.getElementById("shelf").innerHTML = document.getElementById("shelf").innerHTML.replace(/ /g,"");
</script>
This code is directly after a table with id #shelf. I only have limited control of the output of my software, thus the non-breaking-spaces which needs to be removed (because it breaks the page design/look).
Hope everything is clear! Many thanks for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试 :
try :