Example:
Expand|Select|Wrap|Line Numbers
- function btnclick()
- {
- document.getElementById("sp2").innerHTML="KING"
- }
- </script>
- <span id="sp1">Elvis</span>
- <span id="sp2"></span>
- <span id="sp3">Presley</span>
- <input type="button" onclick="btnclick()" />
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?