Skip to content

[js] 第398天 alert如何让文本换行? #2392

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

第398天 alert如何让文本换行?

我也要出题

Activity

sumerliu

sumerliu commented on May 20, 2020

@sumerliu

\n转义

liangtao125061github

liangtao125061github commented on May 21, 2020

@liangtao125061github

模板字符串

JsonMox

JsonMox commented on May 22, 2020

@JsonMox

先考虑兼容性的问题,再使用转义字符
ie: alert("A\r\nB"); //chrome也可以实现
chrome: alert("A\nB");

jian-x-lan

jian-x-lan commented on Jun 11, 2020

@jian-x-lan

alert('1\n2\n3')
使用\n转义

bozaigao

bozaigao commented on Sep 22, 2020

@bozaigao

\n

hyj443

hyj443 commented on Oct 27, 2021

@hyj443

\n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    jsJavaScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @haizhilin2013@sumerliu@bozaigao@liangtao125061github@hyj443

        Issue actions

          [js] 第398天 alert如何让文本换行? · Issue #2392 · haizlin/fe-interview