日期:2014-05-16 浏览次数:20352 次
.bind("input", function() { onChange(0, true); });
q: encodeURIComponent($.trim(lastWord(term))),
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title></title> <link rel="stylesheet" type="text/css" href="css/jquery.autocomplete.css" /> <script type="text/javascript" src="js/jquery.js"> </script> <script type='text/javascript' src='js/jquery.bgiframe.min.js'> </script> <script type='text/javascript' src='js/jquery.ajaxQueue.js'> </script> <script type='text/javascript' src='js/thickbox-compressed.js'> </script> <link rel="stylesheet" type="text/css" href="css/main.css" /> <script type='text/javascript' src='js/jquery.autocomplete.js'> </script> <link rel="stylesheet" type="text/css" href="js/thickbox.css" /> <script type="text/javascript"> $().ready(function(){ var url_ = "action"; $("#suggest13").autocomplete(url_, { delay : 10, dataType: "json", minChars: 1, width: 310, matchContains: true, extraParams: { url: function(){ return encodeURIComponent(encodeURIComponent("xxx")) } }, parse: function(data){ return $.map(data, function(row){ return { data: row, value: row.name, result: row.name } }); }, formatItem: function(row, i, max){ return row.name; }, formatResult: function(row){ return row.name; } }).result(function(e, item){ alert(item.lo); }); }); </script> </head> <body> <input type="text" id="suggest13" /> </body> </html>