zoukankan      html  css  js  c++  java
  • 轻量级表格插件Bootstrap Table。拥有强大的支持固定表头、单/复选、排序、分页、搜索及自定义表头等功能。

    Bootstrap Table是轻量级的和功能丰富的以表格的形式显示的数据,支持单选,复选框,排序,分页,显示/隐藏列,固定标题滚动表,响应式设计,Ajax加载JSON数据,点击排序的列,卡片视图等。

    其相关链接: 以及其他学习资源,详解看

    http://www.html580.com/11556

    其简单示例,详细 看链接

    页面调用

    <link rel="stylesheet" href="bootstrap.min.css">
    <link rel="stylesheet" href="bootstrap-table.css">
    
    <script src="Jquery.min.js"><script>
    <script src="bootstrap.min.js"><script>
    <script src="bootstrap-table.js"><script>
    
    //data-url 要调用的/控制器/方法?参数  例:/Aniuge/TradeOperaLog?tradeId=@Model.TradeId
    //data-field 对应要显示的实体属性
    
    <table data-toggle="table"
           data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data1/" id="operaLog">
        <thead>
        <tr>
            <th data-field="name" data-formatter="nameFormatter">Name</th>
            <th data-field="stargazers_count" data-formatter="starsFormatter">Stars</th>
            <th data-field="forks_count" data-formatter="forksFormatter">Forks</th>
            <th data-field="description">Description</th>
        </tr>
        </thead>
    </table>
    
    
    //刷新列表 在AJAX后调用此方法
    function loadTradeLog()
    {
    //table  id=operaLog;
    $("#operaLog").bootstrapTable("refresh",{url:":/Aniuge/TradeOperaLog?tradeId=@Model.TradeId
    "})
    }
    
    
    //将列设为链接
    function nameFormatter(value) {
        return '<a href="https://github.com/wenzhixin/' + value + '">' + value + '</a>';
    }
    
    function starsFormatter(value) {
        return '<i class="glyphicon glyphicon-star"></i> ' + value;
    }
    
    function forksFormatter(value) {
        return '<i class="glyphicon glyphicon-cutlery"></i> ' + value;
    }
    
    
    其他详解建议查看网站详情   很多例子和示例
  • 相关阅读:
    ORA00911: 无效字符
    在创建外键约束时追加on delete cascade或on delete set null
    仿58同城下拉菜单
    经典SQL语句大全
    Substitution 使用方法 页面缓存时的局部刷新
    解决IE8开发人员工具无法使用的问题
    ASP.NET 页面缓存 @ OutputCache
    关于clientWidth、offsetWidth、clientHeight、offsetHeight的测试比较
    调用ThunderAgent 迅雷局域网版的开发
    仿58同城 tips 鼠标悬停提示 类似title、alt
  • 原文地址:https://www.cnblogs.com/qingrp-2015930/p/4852409.html
Copyright © 2011-2022 走看看