2

i have the following questions for html5 mobile textbox.

  1. is there any option to open number keyboard for ios and android platform if the input is type="text".

  2. issue i am facing here is, if the textbox is type="number", not able to append $, % symbols dynamically in the textbox(to reproduce this open html page in android or ios browser)

    is there any option to include $, % symbol in the textbox, if type must be type="number" the value not appearing in safari,chrome and android browsers.

Sample:

http://jsfiddle.net/bharathid/bFk9c/

open the above URL in firefox it's working fine, but while opening in chrome value disappeared.

Note:

in my case not like to use $, % symbol in separate span.

Reference:

iOS5 show numeric keypad by default without using type="number" or type="tel"

Community
  • 1
  • 1
Bharathi D
  • 953
  • 1
  • 15
  • 28

1 Answers1

7

Try this...

<input type="number" />
<input type="tel" />

Both of these present the numeric keypad when the input gains focus.

Everything else seems to bring up the standard keyboard.

you can see this For iOS

without using those we cant use any numbers key board... insence of Both iOS and ANDROID.

Protector one
  • 6,926
  • 5
  • 62
  • 86
Whats Going On
  • 1,379
  • 6
  • 20
  • 49
  • 1
    i am asking in html5 page. not a android page. – Bharathi D Mar 14 '14 at 06:03
  • Can You Show that... I mean at the Part of HTML Code Where you are mentioning Key Board.. If its Default or 3rd Party Browser.. we many not Use this.. if its Your own Web view or web browser(negative browser) it will work... – Whats Going On Mar 14 '14 at 06:11
  • if we are used type="number" it open number keybord by default, if we used type="text" it will open a normal keyboard. – Bharathi D Mar 14 '14 at 06:22
  • http://blog.teamtreehouse.com/using-html5-input-types-to-enhance-the-mobile-browsing-experience – Bharathi D Mar 14 '14 at 06:23
  • yes it will be there for android But for window i dont know... and its also there for black berry,,, – Whats Going On Mar 14 '14 at 06:58
  • Note that `type=number` will not allow commas to be input, in certain browsers. (Certain regions use commas instead of the decimal point.) https://www.ctrl.blog/entry/html5-input-number-localization – Protector one Mar 11 '19 at 14:49