HTML5 input type date, color, range support in Firefox and Internet Explorer

前端 未结 4 443
醉酒成梦
醉酒成梦 2020-12-08 20:05

I\'ve build all my website using many forms with HTML5 (using the input types date, color and range.)

Everything

相关标签:
4条回答
  • 2020-12-08 20:39

    All browsers fallback to input type text if special input is missing. Its all about widgets and validation.

    Following support range widget

    Firefox Desktop 23

    Firefox 29

    Opera Desktop

    Opaera

    Chrome Desktop

    chrome desktop

    Chrome Mobile

    Chrome mobile

    IOS safari 5

    IOS Safari 5

    .

    .

    .

    Following browsers now supports color widget

    Firefox Desktop 29

    Firefox 29 color input Ubuntu

    Opera Desktop 11

    Opera desktop color input

    Chrome Desktop 20:

    chrome input type color Ubuntu

    Android 4.4 / Chrome Mobile :

    chrome mobile color input

    Opera mobile:

    opera mobile color input

    Blackberry:

    blackberry color input

    Firefox os 1.3

    Firefox os now supports color input but i still don't have a screen shot

    If u want u can use this http://www.eyecon.ro/colorpicker/

    0 讨论(0)
  • 2020-12-08 20:41

    Since HTML5 hasn't been completely standardized yet, not all browsers do support these input types. The intended behaviour is to fall back to <input type="text">.

    ↪ See here for more information on browser support for HTML5 input types.

    You can test for support using the Modernizr library or with some custom JavaScript. If you detect a certain HTML5 feature isn't available, you can fall back to JavaScript-based alternatives.

    0 讨论(0)
  • 2020-12-08 20:48

    I had a similar problem with input type=range. Everything was working on all browser, except for Internet Explorer 10. It was not a problem with Internet Explorer, given that I could see the slider in other websites. The solution was to turn off i.e. compatibility view for my website.

    0 讨论(0)
  • 2020-12-08 20:50

    the best solution I think is to use jquery plugins.

    <!doctype html>
    
    <html lang="en">
    <head>
      <meta charset="utf-8" />
      <title>jQuery UI Slider - Default functionality</title>
      <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
      <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
      <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
      <link rel="stylesheet" href="/resources/demos/style.css" />
      <script>
      $(function() {
        $( "#slider" ).slider();
      });
      </script>
    </head>
    <body>
    
    <div id="slider"></div>
    
    
        </body>
    
    </html>
    

    http://jqueryui.com/slider/

    0 讨论(0)
提交回复
热议问题