javascript HTML 中的制表符空间
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14290379/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Tab space in HTML
提问by Sumon Bappi
I want to use a tab space in my string. I am providing the code of using new line. But I don't know how to use a tab space in a string. Can anyone help me on this !?
我想在我的字符串中使用制表符空间。我正在提供使用新行的代码。但我不知道如何在字符串中使用制表符空间。谁可以帮我这个事 !?
"Warning ! Sorry Cash Pay is less than this <br/> month\'s installment. Please pay the <br/> right amount."
回答by Shiplu Mokaddim
	
is TAB character in ASCII. But according to html spec all white space characters will be stripped to a single character. There are other white space characters too. Like  
,  
and  
You can try them too.
	
是 ASCII 中的 TAB 字符。但根据 html 规范,所有空白字符都将被剥离为单个字符。还有其他空白字符。像 
, 
并且 
你可以试试他们。
Update
更新
It seems  
gives a spacing of tab size. See the following
它似乎 
给出了标签大小的间距。请参阅以下内容
a b
rendered as a ba b
rendered as a ba b
rendered as a ba b
rendered as a ba	b
rendered as a b
a b
呈现为ba b
呈现为ba b
呈现为ba b
呈现为ba	b
呈现为b