我正在使用jQuery数据表,我想在搜索输入框内显示带有搜索图标的"搜索"文本作为占位符.我管理添加文本.请告诉我如何添加占位符图像
$(document).ready(function() { $('#example').DataTable({ oLanguage: { sSearch: '' }, "aoColumnDefs":[{ 'bSortable':false, 'aTargets':[3] } ] }); function InitComplete(oSettings) { $('#example_filter') .contents() .filter(function() { return this.nodeType == 3 }) .replaceWith('Refine search: '); } $('.dataTables_filter input').attr("placeholder", "Search");
我需要知道,如何添加像这样的图像 ''
加
"searchPlaceholder": "search"
防爆
$('#datatable').DataTable({ "dom": 'lCfrtip', "order": [], "colVis": { "buttonText": "Hi?n th?", "overlayFade": 0, "align": "right" }, "language": { "lengthMenu": '_MENU_ b?n ghi trên trang', "search": '', "searchPlaceholder": "search", "paginate": { "previous": '', "next": '' } } });