简体   繁体   中英

How to text-align right a javascript ALERT?

I am trying to right align some text in a javascript alert box. It is an Israeli client so the context is in hebrew and should be right aligned.

alert("הצעת חוק פרטית לאסור על\n מוסדות המדינה לשלם לספקים תמורת טובין ושירותים בתשלומים דחויים");

It does look ok in FireFox and Chrome, but not in IE9.

ideas?

Use some alternative javascript alerts like Impromptu or similar. Its style can easily be configured to suite your needs and most of them are cross-browser compatible.

If you are using a version of IE9 which is in a language that is based on right aligned text, the text will be right-aligned in IE9 (native) windows. Are you sure you're testing with a hebrew version of IE9? Keep in mind, unlike FF and Chrome, IE9 UI language == Windows language.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM