我使用分页和使用 jquery 进行排序。我也启用了自动完成功能。
下面是自动完成
<link rel="stylesheet" type="text/css" href="<%=resourcePath %>/css/autocomplete.css"/>
<script type="text/javascript" src="<%=resourcePath %>/scripts/prototype/prototype.js"></script>
<script type="text/javascript" src="<%=resourcePath %>/scripts/script.aculo.us/effects.js"></script>
<script type="text/javascript" src="<%=resourcePath %>/scripts/script.aculo.us/controls.js"></script>
<script type="text/javascript" src="<%=resourcePath %>/scripts/autocomplete.js"></script>
这用于分页和排序
<script src="<%=resourcePath%>/data-page/jquery-latest.js" type="text/javascript"></script>
<!-- Table Sorter -->
<script type="text/javascript" src="<%=resourcePath%>/data-page/jquery.tablesorter.js"></script>
<script type="text/javascript">
$.noConflict(true);
$(function() {
$("#product-table").tablesorter();
});
</script>
<link href="<%=resourcePath%>/data-page/table-sorter.css" rel="stylesheet" type="text/css">
<script src="<%=resourcePath%>/data-page/smartpaginator.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function () {
var t = document.getElementById('total').value;
//var r = document.getElementById('rec_per_page').value;
$('#paginator').smartpaginator({ totalrecords: t, recordsperpage: 10, datacontainer: 'product-table', dataelement: 'tr', initval: 0, next: 'Next', prev: 'Prev', first: 'First', last: 'Last'});
});
</script>
当我删除以下分页和排序工作并且自动完成功能不起作用时
<script type="text/javascript" src="<%=resourcePath %>/scripts/prototype/prototype.js"></script>
当我添加以上内容时,反之亦然。
如何克服这个?
请帮我。
问候