zoukankan      html  css  js  c++  java
  • 一些小总结-04

    7.easyUI中的datagrid控制列表特殊行颜色
    如图:

    
    
    在datagrid的样式里面做一个判断,当某中条件的时候就进行行内样式的修改,其他的都不变。
    <div data-options="region:'center'">
        <table id="projectList" class="easyui-datagrid" data-options="
                rowStyler: function(index,row){
                   if (row.status ==0){
                      return 'color:gray';
                   }
                }"
    width="100%">
            <div id="tb" class="list_opear">
                <a onclick="toEdit('')" class="easyui-linkbutton" data-options="iconCls:'icon-add'">新建</a>
            </div>
        </table>
    </div>
    8.easyUI中的combobox下拉框前台本地搜索
    如图:

    
    
    HTML:
    <td align="center"><span style="color: red">*</span>负责人</td>
    <td><input id="ownerid" class="easyui-combobox" data-options="required:true"
              
    style="width:200px;"/></td>
    JavaScript:
    function loadlb() {
        var json = getJsonData('../getUserList.hebe');//初始数据后台获取
        $("#ownerid").combobox({
            prompt: '输入姓氏后自动搜索',//该属性是textbox中的
            mode: "local",//定义文本改变时过滤读取本地列表
            data: json,//数据格式
            valueField: 'id',//组件值
            textField: 'name',//文本值
            hasDownArrow: true,//定义显示向下箭头按钮
            filter: function (q, row) {//文本参数显示列表
                var opts = $(this).combobox('options');
                return row[opts.textField].indexOf(q) == 0;
            }
        });
    }
    则可以实现前台本地搜索定位,如图:

    
    
  • 相关阅读:
    [转]IUnkown生命周期管理
    [转] com 基本数据类型
    Centos 7 修改开机等待时间 Alex
    乌班图的安装常用命令 Alex
    Ubuntu切换root用户 Alex
    乌班图开启关闭防火墙 Alex
    Ubuntu远程root用户登录 Alex
    Centos 8 更改为阿里云源 Alex
    LVS调度之搭建NAT模型实现 Alex
    解决挂载mount: wrong fs type, bad option, bad superblock on Alex
  • 原文地址:https://www.cnblogs.com/bad-guy/p/10997663.html
Copyright © 2011-2022 走看看