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!
尝试:
document.getElementById(\"shelf\").innerHTML = document.getElementById(\"shelf\").innerHTML.replace(/\ [ ]*\;/gi,"");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.