携帯サイトをxhtmlで作る時の文字入力モードの指定方法
携帯サイトでフォーム入力をする際、入力モードが自動的に変わるのはPCサイト以上に大切だと思っています。
input要素の属性で文字入力モードを指定する場合、htmlだと
そこで登場するのが-wap-input-formatです。
input要素の属性で文字入力モードを指定する場合、htmlだと
- i-modeとez-web
- istyle=1 (全角かな)
- istyle=2 (半角カナ)
- istyle=3 (英字/半角文字)
- istyle=4 (数字/半角文字)
- softbank
- mode="hiragana" (全角かな)
- mode="katakana" (半角カナ)
- mode="alphabet" (英字/半角文字)
- mode="numeric" (数字/半角文字)
そこで登場するのが-wap-input-formatです。
- i-modeとsoftbank
- style="-wap-input-format:'*<ja:h>'"(全角かな)
→エスケープすると style="-wap-input-format:"*<ja:h>"" - style="-wap-input-format:'*<ja:hk>'"(半角カナ)
→エスケープすると style="-wap-input-format:"*<ja:hk>"" - style="-wap-input-format:'*<ja:en>'"(英字/半角文字)
→エスケープすると style="-wap-input-format:"*<ja:en>"" - style="-wap-input-format:'*<ja:n>'"(数字/半角文字)
→エスケープすると style="-wap-input-format:"*<ja:n>"" - ez-web
- style="-wap-input-format:*M;"(全角かな)
- style="-wap-input-format:*m;"(英字/半角文字)
- style="-wap-input-format:*N;"(数字/半角文字)
という具合になります。
これを3キャリア共通にするためには;;で区切ってひとつながりに書くと大丈夫のようです。
- style="-wap-input-format:"*<ja:h>";-wap-input-format:*M;"(全角かな)
- style="-wap-input-format:"*<ja:hk>";-wap-input-format:*M;"(半角カナ)(ez-webは半角カナはなし)
- style="-wap-input-format:"*<ja:en>";-wap-input-format:*m;"(英字/半角文字)
- style="-wap-input-format:"*<ja:n>";-wap-input-format:*N;"(数字/半角文字)

コメントする