JQuery autocomplete how to write label in autocomplete text input?

前端 未结 5 1929
花落未央
花落未央 2020-12-18 05:57

Hello I am using jQuery UI autocomplete.

I am getting values and labels from the drop down area. I will write the value in a hidden input and use it later. I could d

5条回答
  •  情书的邮戳
    2020-12-18 06:21

    just add return false to your function like this, FIDDLE

        $("#tags").autocomplete({
            source: yerler,
            select: function (event, ui) {
                $("#projeKatmanRaporCbx").val(ui.item.value);
                $( "#tags" ).val( ui.item.label );
                return false;
            }
        });
    

提交回复
热议问题