$(document).ready(function() {
	$("#searchzx").autocomplete(
	"_getzx.php",
	{
	delay:10,
	minChars:1,
	matchSubset:1,
	matchContains:1,
	cacheLength:10,
	onItemSelect:selectItem,
	onFindValue:findValue,
	formatItem:formatItem,
	autoFill:false
	}
    );
});
function findValue(li) {
	if( li == null ) return alert("No match!");
	if( !!li.extra ) var sValue = li.extra[0];
	else var sValue = li.selectValue;
	}
function selectItem(li) { findValue(li);}
function formatItem(row) { return row[0];//return row[0] + " (id: " + row[1] + ")"//如果有其他参数调用row[1]，对应输出格式Sparta|896
}
function lookupAjax(){
var oSuggest = $("#search")[0].autocompleter;
oSuggest.findValue();
return false;
}
