0

jQuery的新嘗試,嘗試使用Autocomplete。去http://jqueryui.com/download建立我自己的下載,從「小工具」部分選擇「自動完成」。這導致「Core」,「Widget」和「Position」自動檢查。正確的jQuery UI自動完成文件

我下載了我的自定義jQuery UI,並按照說明進行操作,並在我的頁面中添加了以下內容。

<link type="text/css" href="css/custom-theme/jquery-ui-1.8.7.custom.css" rel="stylesheet" />  
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script> 
<script type="text/javascript" src="js/jquery-ui-1.8.7.custom.min.js"></script> 

但是,自動完成功能不起作用,並且螢火蟲顯示沒有錯誤。我決定包括:

<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.css" type="text/css" /> 
<script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgiframe.min.js"></script> 
<script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js"></script> 

一切都開始工作!但我很困惑,我認爲jQuery構建器會包含所有必要的代碼和樣式以使Autocomplete正常運行,所以爲什麼我需要添加這些額外的包含才能使其運行?由於

回答