我想在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)字符不起作用.文本在所有行中保持对齐.请帮忙.
遗憾的是,这似乎已经成为一个问题一段时间了:(
http://productforums.google.com/forum/#!topic/chrome/bfmvqAvtSd4
发现了这一点,这看起来像是不可能的。
也许使用外观模仿警报框的东西?
| 归档时间: |
|
| 查看次数: |
8891 次 |
| 最近记录: |