问题:对象不支持属性或方法'autocomplete' [英] Problem: Object doesn't support property or method 'autocomplete'
本文介绍了问题:对象不支持属性或方法'autocomplete'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
In master page I wrote:
<script src="../Scripts/MicrosoftAjax.js"></script>
<script src="../Scripts/MicrosoftMvcAjax.js"></script>
<script src="../Scripts/jquery-2.1.1.min.js"></script>
<script src="../Scripts/PersonScript.js"></script>
<script src="../Scripts/PersonIndexScript.js"></script>
---------------
In Index view I wrote:
...
<link href="../Content/jquery.autocomplete.css" rel="stylesheet" />
<script src="../Scripts/jquery.autocomplete.min.js"></script>
<script src="../../Scripts/PersonIndexScript.js"></script>
...
<input type="text" id="txtSearch" name="query" />
------------------
In PersonIndexScript.js I have:
/// <reference path="jquery.autocomplete.min.js" />
/// <reference path="jquery-2.1.1.intellisense.js" />
$(function () {
$("#txtSearch").autocomplete("/Person/SearchCandidates",
{minchar : 3});
});
----------
In IE11 I got the error "Object doesn't support property or method 'autocomplete'"
In Chrome and firefox It makes no difference and It doesn't work.
推荐答案
(function(){
(function () {
(#txtSearch )。autocomplete(/ Person / SearchCandidates,
{minchar:3});
});
----------
在IE11中我收到错误对象不支持属性或方法'自动完成'
在Chrome和Firefox中它没有任何区别它不起作用。
("#txtSearch").autocomplete("/Person/SearchCandidates", {minchar : 3}); }); ---------- In IE11 I got the error "Object doesn't support property or method 'autocomplete'" In Chrome and firefox It makes no difference and It doesn't work.
你忘了在你的母版页中添加引用到jvascript jquery-ui-1.8 .20.js
(或新版本)提供自动完成功能。
You forgot to add reference, in your master page, to the jvascript "jquery-ui-1.8.20.js
" ( or a new version) that provides the autocomplete functionalities.
这篇关于问题:对象不支持属性或方法'autocomplete'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文