function popup()
{
alert (
"I will tell the truth. I will write deliberately and with accuracy."
+ " I will acknowledge and correct mistakes promptly. I will preserve"
+ " the original post, using notations to show where I have made changes"
+ " so as to maintain the integrity of my publishing. I will never delete"
+ " a post. I will not delete comments unless they are spam or off-topic."
+ " I will reply to emails and comments when appropriate, and do so promptly."
+ " I will strive for high quality with every post – including basic spellchecking."
+ " I will stay on topic. I will disagree with other opinions respectfully."
+ " I will link to online references and original source materials directly."
+ " I will disclose conflicts of interest. I will keep private issues and topics"
+ " private, since discussing private issues would jeopardize my personal and work"
+ " relationships.");
}
答案 0 :(得分:1)
您只能在alert()
中执行一项操作,添加\n
,这会将文字换成换行符。
alert ( "I will tell the truth. \n I will write deliberately and with accuracy. \n I will acknowledge and correct mistakes promptly.......")
如果您想应用HTML和样式,请转到DHTML框(如灯箱,花式框...)
答案 1 :(得分:1)
你可以使用这个:
警告(“我会说实话。我会刻意并且准确地写。我会及时承认并纠正错误。我会保留原帖,使用符号来显示我所做的更改,以保持完整性我的发布。我永远不会删除帖子。我不会删除评论,除非它们是垃圾邮件或偏离主题。我会在适当的时候回复电子邮件和评论,并及时这样做。我会努力追求高质量的每一篇文章 - 包括基本的拼写检查。我将继续讨论主题。我将不同意其他意见。我将直接链接到在线参考资料和原始资料。我将披露利益冲突。我将保密私人问题和主题,因为讨论私人问题会破坏我的个人和工作关系。“。split('。')。join('。\ n'));
它不涉及手动在每个语句后面添加换行符的过程。上面的代码本身就是这个动作。