Visualizzazione dei risultati da 1 a 6 su 6

Visualizzazione discussione

  1. #2
    Utente di HTML.it
    Registrato dal
    Apr 2017
    Messaggi
    4
    Per quanto riguarda la visualizzazione del carattere iniziale ho risolto cosi:

    codice:
    <!
    codice:
    doctype html>
    codice:
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <meta name="viewport"content="width=device-width, initial-scale=1">
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
    <link rel="stylesheet"href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
    <link rel="stylesheet"href="/resources/demos/style.css">
    <style>
    .ui-autocomplete {
    max-height: 100px;
    overflow-y: auto;
    /* prevent horizontal scrollbar */
    overflow-x: hidden;
      }
    /* IE 6 doesn't support max-height
       * we use height instead, but this forces the menu to always be this tall
       */
    * html .ui-autocomplete {
        height: 100px;
      }
    </style>
    
    <script>
      $( function() {
        var availableTags = [
    "casa", "cane", "moto", "scooter", "auto", "trattore","aereo" ];
        $( ".autom" ).autocomplete({
              source: function( request, response ) {
                      var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( request.term ), "i" );
                      response( $.grep( availableTags, function( item ){
                          return matcher.test( item );
                      }) );
                  }
            });
      } );
    
    
    </script>
    </head>
    <body>
    
    
    
    </body>
    </html>




    ...Mi resta capire come limitare l'inserimento nel input text... grazie
    Ultima modifica di carlomarangoni; 02-04-2017 a 17:06

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.