-3
我是新的JavaScript和我想结合2个JavaScript块,但我分崩离析?如何结合两个JavaScript代码块
第一块
<script>
$(document).ready(function() {
// Setup - add a text input to each footer cell
$('table.table tfoot th').each(function() {
var title = $(this).text();
$(this).html('<input type="text" placeholder="'+title+' ARA" />');
});
// DataTable
var table = $('table.table').DataTable();
// Apply the search
table.columns().every(function() {
var that = this;
$('input', this.footer()).on('keyup change', function() {
if (that.search() !== this.value) {
that
.search(this.value)
.draw();
}
});
});
});
</script>
第二块
$('table.table').DataTable({
"order": [
[0, "desc"]
],
paging: true,
"oLanguage": {
"sUrl": "js/dil/LANGUAGE.json",
}
});
我想补充 “oLanguage” 和 “秩序” 行第一个JavaScript。我该怎么办?
+ $(this).text()+不显示seacrh结果?其他人正在工作 – Andrew