When you insert value to an empty span in IE, the browser will not add the needed space between spans.
Example:
[HTML]<script>
function btnclick()
{
document.getEle mentById("sp2") .innerHTML="KIN G"
}
</script>
<span id="sp1">Elvis </span>
<span id="sp2"></span>
<span id="sp3">Presle y</span>
<input type="button" onclick="btncli ck()" />
[/HTML]
When you push the button, "KING" is inserted in the secong span, like this
Elvis KINGPresley
with no space between KING and Presley
Anyone knows a way around this?
Example:
[HTML]<script>
function btnclick()
{
document.getEle mentById("sp2") .innerHTML="KIN G"
}
</script>
<span id="sp1">Elvis </span>
<span id="sp2"></span>
<span id="sp3">Presle y</span>
<input type="button" onclick="btncli ck()" />
[/HTML]
When you push the button, "KING" is inserted in the secong span, like this
Elvis KINGPresley
with no space between KING and Presley
Anyone knows a way around this?
Comment