ユーザーがonblurイベントを発生させたときに、テキスト入力ボックスの内容を左揃えにする方法を探しています。onblur = "this.value = this.value"で問題を解決するという言及を見てきましたが、これはIEでは機能しません。
明確にするために:この問題は、ユーザーがテキストボックスの幅を超えて入力し、フォーカスを離れたときにInternetExplorerで発生します。ChromeとFirefoxでは、テキストは自動的に左揃えになりますが、IEでは発生しません。
リクエストに応じて、コードを添付しました(IEで表示):
<input type="text" />
http://jsfiddle.net/t3hjonneh/FZJjW/
テキストフィールド:
入力後:
ぼかし後:
どのように見えるべきか: