Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

Include Page
SGTDOC:ФИАС: предупреждение
SGTDOC:ФИАС: предупреждение

Code Block
languagehtml/xml
<input id="address" name="address" type="text" />
<link href="http://ВАШ_СЕРВЕР:ПОРТ/suggestions/libs/jquery.suggestions/stable/css/suggestions.css" type="text/css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="http://ВАШ_СЕРВЕР:ПОРТ/suggestions/libs/jquery.suggestions/stable/js/jquery.suggestions.js"></script>
<script>
    $("#address").suggestions({
        serviceUrl: "http://ВАШ_СЕРВЕР:ПОРТ/suggestions/api/4_1/rs",
        type: "FIAS",
        /* Вызывается, когда пользователь выбирает одну из подсказок */
        onSelect: function(suggestion) {
            console.log(suggestion);
        }
    });
</script>

...