作者:Vicky小希希 | 来源:互联网 | 2023-10-10 20:55
IamtryingtoimplementjQueryUIAutocompletebehaviourinaTextBox.Ihavefollowedanexamplea
I am trying to implement jQuery UI Autocomplete behaviour in a Text Box.I have followed an example and It works fine. But some syntax making me confused. Here is the code snippet:
我尝试在一个文本框中实现jQuery UI自动完成行为。我举了一个例子,它很好用。但是有些语法让我很困惑。下面是代码片段:
@Html.LabelFor(a => a.name)
@Html.TextBoxFor(a => a.name, new { data_autocomplete_url = Url.Action("Autocomplete") })
I am declaring the TextBox to have an attribute data-autocomplete-url
. But in the jQuery UI autocomplete function I am using only autocomplete-url
without data-
prefix. How this works ?
我声明这个文本框有一个属性数据自动完成url。但是在jQuery UI自动完成函数中,我只使用没有数据前缀的autocomplete-url。这是如何工作的?
1 个解决方案