テキストの中央揃えでJavascriptアラートボックスに3行のテキストを表示したいと思います。
そのために次のコードを使用しています、
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!"
);
Firefoxでは正常に動作しています。しかし、クロムでは、タブ(\t
)文字が機能していません。テキストはすべての行で左揃えになります。助けてください。