简体   繁体   中英

How to use jQuery autocomplete correctly?

I am trying to use autocomplete from

http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js

but am getting this error. textbox is the id of the input field where autocomplete should happen:

在此处输入图片说明

I have tried to follow the example given on this page . What am I doing wrong here?


Getting the same error on using ready :

在此处输入图片说明

I think, you have NOT included the script yet. Put this in the head of your page and test.

<script  src="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js"/>

include jquery.js and autocomplete.js on the top of page and write the code inside

$(document).ready(function(){
// right here
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM