Hello Wor...">

Javascript Removing Whitespace When It Shouldn't?

I have a HTML file that has code similar to the following.
Hello World
I am using javascript like the following to get the value document.getElementById(cell2.Element.id).innerText This returns the text "Hello World" with only 1 space between hello and world. I MUST keep the same number of spaces, is there any way for that to be done? I've tried using innerHTML, outerHTML and similar items, but I'm having no luck.

以上就是Javascript Removing Whitespace When It Shouldn't?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准