自动完成令牌输入框在 IE 和 Firefox 中正常工作,但在 safari 和 crome 中不起作用。
这是代码的一部分
<script type="text/javascript" src="<%=path%>/js/jquery-1.4.4.min.js"></script>
//for auto complete
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jqueryAutocomplete/jquery.autocomplete.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jqueryAutocomplete/jquery.ajaxQueue.js"></script>
<link type="text/css" media="screen" rel="stylesheet" href="<%=request.getContextPath()%>/css/jqueryAutocomplete/jquery.autocomplete.css" />
$j(document).ready(function(){
$j("#id_CBRERegion").tokenInput(path + "fetchAutoCompleteResult.do?method=regionList", {
theme: "facebook",
queryParam: "search",
minChars: 1,
preventDuplicates: true,
hintText:"CBRE Region",
prePopulate: selRegCode
});
$j('#id_CBRERegion').prev().find("input").blur();
registerAutoEvent('id_CBRERegion','id_CBRERegion_Temp');
if(document.getElementById('id_CBRERegion').value != "") {
$j('#id_CBRERegion_Temp').hide();
} else if(document.getElementById('id_CBRERegion').value == "") {
$j('#id_CBRERegion_Temp').next().hide();
}
});
请建议..