我想创建一个带搜索,排序功能的数据表,但没有。记录选择下拉列表。我试过以下代码:
<span>היי</span><span>so</span><span>היי</span><span>all whats up</span><span>אתכם</span>
我无法获得25,50,100条记录的下拉菜单。另外,我想在顶部添加一个新按钮以添加新行。
答案 0 :(得分:-1)
如此处所述https://datatables.net/examples/api/add_row.html
$(document).ready(function() {
var t = $('#example').DataTable();
var counter = 1;
$('#addRow').on( 'click', function () {
t.row.add( [
counter +'.1',
counter +'.2',
counter +'.3',
counter +'.4',
counter +'.5'
] ).draw();
counter++;
} );
// Automatically add a first row of data
$('#addRow').click();
});
答案 1 :(得分:-1)
我找到了我想要的解决方案。这是代码,这可能对其他人有帮助。
self.videoPlayer = [[XCDYouTubeVideoPlayerViewController alloc] initWithVideoIdentifier:self.youtubeID];
[self.videoPlayer presentInView:self.videoView];
[self.videoPlayer.moviePlayer play];
在顶部区域的数据表中添加按钮链接
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
if (fromInterfaceOrientation == UIDeviceOrientationPortrait) {
[self.videoPlayer.moviePlayer setFullscreen:YES animated:NO];
}