-4
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.");
} 
4

2 回答 2

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 框(如灯箱、花式框...)

于 2012-10-11T11:32:52.953 回答
1

你可以使用这个:

alert("我会说实话。我会认真、准确地写。我会及时承认并纠正错误。我会保留原始帖子,使用符号显示我所做的更改,以保持我的发布的完整性. 我永远不会删除帖子。我不会删除评论,除非它们是垃圾邮件或离题。我会在适当的时候回复电子邮件和评论,并及时回复。我会为每篇帖子争取高质量——包括基本的拼写检查. 我会坚持主题。我会尊重地不同意其他意见。我将直接链接到在线参考资料和原始源材料。我会披露利益冲突。我会保密私人问题和主题,因为讨论私人问题会危及我的个人和工作关系。".split('.')。加入('.\n'));

It doesn't involve the process of putting newline after each statement manually. The above code does this action itself.

于 2012-10-11T11:36:30.797 回答