<link rel="stylesheet" type="text/css" href="css/jquery.autocomplete.css" />
<script type="text/javascript" src="jscripts/jquery.autocomplete.js"></script>
<script>
$(document).ready(function(){
$("#cat_name1").autocomplete("auto_suggest.php", {
minChars: 0,
max: 120,
autoFill: true,
mustMatch: true,
matchContains: false,
selectFirst: true,
scrollHeight: 220,
});
});
</script>
<div id="categorrySelection" class="Post_catsearchcontent">
<label>Search Category <span style="color:#FF0000;">*</span></label>
<input name = "cat_name1" type = "text" id="cat_name1"
id="cat_name1" class="required" size="35" >
<input name = "cat1" type = "hidden" id="cat1">
</div>
在我的情况下,当我在文本框中搜索某些内容时,它会向我显示值,但是当我选择该值时,有时它会正常工作,有时文本框在选择后会变空。
我该如何调试?
答案 0 :(得分:0)
您的输入元素中可能需要autocomplete =“off”属性。