当您缩小浏览器窗口时,您会看到 iphone 布局的不同布局...如何在搜索文本框旁边添加按钮....这里的问题是我在 js 中获取文本框...不知道如何在js中获取按钮......
在下面提供我的代码
<script type="text/javascript" >
$(document).ready(function() {
$('#inventoryTable').dataTable( {
"bFilter": true,
"bLengthChange": false,
//"bJQueryUI": true,
"bSort": false,
"iDisplayLength": 20,
"sPaginationType": "full_numbers"
} );
$('.dataTables_length').remove();
$('.dataTables_info').remove();
$('.dataTables_filter').css("text-align", "center");
$(function() {
var search = $('.dataTables_filter').detach();
$('.page-title').before(search);
search.css('margin-left','0');
var div = $('.dataTables_filter');
var start = $(div).offset().top;
$.event.add(window, "scroll", function() {
var p = $(window).scrollTop();
$(div).css('position', ((p) > start) ? 'fixed' : 'static');
$(div).css('top', ((p) > start) ? '0px' : '');
});
});
});
</script>