日期:2014-05-16 浏览次数:20373 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ERP采购价格查询</title>
<link href="css/jquery.autocomplete.css" type=text/css rel=stylesheet>
<script src="js/jquery_s.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery.autocomplete.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!--<link rel="stylesheet" type="text/css" href="css/style.css" />-->
<style type="text/css">
* {
padding:0;
margin:0;
}
body {
font-family:verdana;
font-size:12px;
margin-left: 0px;
margin-top: 0px;
}
.content {
width:1100px;
margin:20px 10px;
}
.content h1 {
font-family:'??';
font-size:18px;
padding-bottom:5px;
}
table {
width:100%;
}
th, td {
padding:6px 0;
text-align:center;
}
th {
background-color:#accdf4;
color:#ffffff;
}
tr {
background-color:#FFFFFE;
}
.odd {
background-color:#FFFAFF;
}
.highlight {
background-color:#E0E0E0;
}
.STYLE3 {font-size: 14px}
</style>
<script language="javascript">
$(document).ready(function() {
$("#keyword").autocomplete("getajaxtag.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 = $("#keyword")[0].autocompleter;
o