数据 Table 输入类型为文本而不是搜索

Data Table input type as text instead of search

数据Table 输入类型为文本而不是搜索

我有一个使用 CakePHP 填充数据 table 的系统,令人惊奇的部分是

它的搜索字段是这样的

<input type="text" aria-controls="c_table">

我填充的日期 table 是

<input type="search" class="" placeholder="" aria-controls="c_table">

如何更改我自己填充的数据 table 搜索栏作为输入类型 "text" 而不是 "search"

var dt = $('#clients_table').DataTable( {
        "processing": true,
        "serverSide": true,
"oLanguage": {
"sSearch": "Search"},
"sDom": '<"top"f>irt<"bottom"lp><"clear">'

以上是我的数据 table 声明的一部分,但我认为这不会影响搜索栏而不是文本,我想知道 cake PHP 实际上如何将搜索更改为文本数据 table.

感谢您的帮助

哦,现在我明白你要去哪里了。您想摆脱丑陋的 × when type=search on <input>'s in Chrome and Safari?简单地:

input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

dataTables 演示 -> http://jsfiddle.net/Lwwv5jLe/