0
我想實現自動完成使用jQuery UI但自動完成文本框是在「與」敲除綁定,所以MVC行動永遠不會被解僱。jQuery自動完成不射擊行動當元素是內敲除「與」綁定
<div data-bind="with: activeButton">
//Some other div's...
<div>
<input type="text" id="autoCompleteText" data-autocomplete-url="@Url.Action("Autocomplete")"/>
</div>
</div>
//On DOM ready
$('*[data-autocomplete-url]').each(function() {
$(this).autocomplete({
source: $(this).data("autocomplete-url")
});
});
當自動完成元素在「with」敲除綁定中時,我是否必須做出與MVC動作不同的動作?
你有沒有意識到存在 「數據autocomplete- URL」 的空間?如果這是你的代碼,那麼它可能會打破它。 – Drummad
修正了它。謝謝! – Amit
這不是我的代碼。 – Amit