0
MVC에 선행 입력을 구현하기 위해 노력하고
4. (내가에게 선행 입력의 JS와 CSS를 포함.)
임 목록을 얻기 위해이 아약스 방법을 사용하여
$(function() {
// get your list
$.getJSON('/Main/GetServiceNames', function (allData) {
$('#servicename').typeahead({source: allData});
});
});
이 는 아약스 요청의 결과입니다
["RetrieveDocument","PublishDocument","PublishFeedback","PublishSurvey","RetrievePartner","RetrieveLabelDocuments","RPCRetrieveZipCode","ESB2InfraService","PublishTest","PublishPolcy"]
그런데 어떤 이유에 대한 결과는 #servicename HTML 입력
에 바인딩합니다. 바인딩하려는 메신저이며 목록이 표시되지 않습니다.
<input type="text" class="form-control" placeholder="servicename" id="servicename" data-provide="typeahead">
편집 : 난은 예를 here를 살펴 보자 여기 typeahead fiddel
감사
미키
부트 럽 3에서 typeahead 플러그인이 제거되었지만? http://stackoverflow.com/a/17904021/651789 – ken
직접 typeahead.js를 추가했습니다. https://github.com/twitter/typeahead.js/ 및 typeahead css to – MIkCode