在JavaScript弹出框中格式化文本 [英] formatting text in JavaScript popup boxes

查看:84
本文介绍了在JavaScript弹出框中格式化文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以使用特殊字符(''\ n'')在文本中添加换行符

JavaScript弹出警告框。


那里也是一些额外的特殊字符:


\''单引号

\"双引号

\& &符号

\\反斜杠

\ n新行

\ r回车

\ t tab

\ b退格

\f换页


是否还有其他字符可用于更多覆盖格式? (粗体

文本等)?我们需要输入\ n内部报价?

是否有一些Javascript弹出警报框文本格式化程序,格式化文本

来自GUI,更方便的方式?

解决方案


ko****@hotmail.com 已写:

我们可以使用特殊字符(''\ n'')在JavaScript弹出警告框中的文本中添加换行符。

还有几个额外的特殊字符:

\''单引号
\双引号
\& &符号
\\反斜杠
\\ n新行
\r回车
\t标签
\b退格
\ f表单提示

是否还有其他字符可用于更多格式化? (粗体
文字等)?我们需要输入\ n内部报价?
是否有一些Javascript弹出警报框文本格式化程序,从GUI格式化文本
,更方便吗?




如果你想图形要么打开一个窗口,要么在页面上的其他所有内容上显示一个HTML元素。


(我自己会使用最后一个)


我的问题是关于JavaScript弹出警报框。


< script type =" text / javascript" ;>

alert(''Text'');

< / script>


< blockquote>

kor ... @ hotmail.com写道:

我的问题是关于JavaScript弹出警报框。

<脚本类型=" text / javascript">
alert(''Text'');
< / script>




对我和我回答你。


顺便说一下:请引用你回复的信息。


We can use special characters (''\n'') to add line breaks in text in
JavaScript popup Alert boxes.

there is also few additional special characters:

\'' single quote
\" double quote
\& ampersand
\\ backslash
\n new line
\r carriage return
\t tab
\b backspace
\f form feed

Is there also additional characters for more reach formatting? (bold
text, etc)? Need we put "\n" inside quotations?
Is there some Javascript popup Alert box text formatter, to format text
from GUI, more handy way?

解决方案


ko****@hotmail.com wrote:

We can use special characters (''\n'') to add line breaks in text in
JavaScript popup Alert boxes.

there is also few additional special characters:

\'' single quote
\" double quote
\& ampersand
\\ backslash
\n new line
\r carriage return
\t tab
\b backspace
\f form feed

Is there also additional characters for more reach formatting? (bold
text, etc)? Need we put "\n" inside quotations?
Is there some Javascript popup Alert box text formatter, to format text
from GUI, more handy way?



If you want graphics either open a window, or display a HTML element on
top of everything else on the page.

(I myself would use the last one)


My question was about the JavaScript popup Alert boxes.

<script type="text/javascript">
alert(''Text'');
</script>



kor...@hotmail.com wrote:

My question was about the JavaScript popup Alert boxes.

<script type="text/javascript">
alert(''Text'');
</script>



Right and I answerd you.

Btw: please quote the message you''re responding to.


这篇关于在JavaScript弹出框中格式化文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆