警告框中的标签'\ t'不适用于Chrome

des*_*oft 6 javascript

我想在Javascript警告框中显示三行文本,文本中心对齐.

我正在使用以下代码,

alert(
    '\t\t\t\t'+"Congratulations!" + '\n\t' +
    "You are now subscribed with test.com!" + '\n' +
    "Keep on eye out on your inbox for future updates from us!"
);
Run Code Online (Sandbox Code Playgroud)

它适用于Firefox.但是在chrome中,tab(\t)字符不起作用.文本在所有行中保持对齐.请帮忙.

Man*_*mer 4

遗憾的是,这似乎已经成为一个问题一段时间了:(

http://productforums.google.com/forum/#!topic/chrome/bfmvqAvtSd4

发现了这一点,这看起来像是不可能的。

也许使用外观模仿警报框的东西?