zoukankan      html  css  js  c++  java
  • easyui获取一行数据和修改data-options的值

    <table id="tab" class="easyui-datagrid" style=" 100%; height: 500px"
                            data-options="url:'JZ.ashx?can=0',onClickRow: onClickRow,
                    singleSelect:true,fit:true,pagination:true,pageSize:10,rownumbers:true
                ">
    </table>
    function onClickRow(rowdata) {
                var row = $('#tab').datagrid('getSelected');
                if (row) {
                    var cc = row.ZONG;
                    cc = parseFloat(cc);
                    cc = cc.toFixed(2);
                    $('#Text1').val(cc);
                    cc = cc / 254.77;
                    $('#Text2').val(cc.toFixed(2));
                }
            }
    问题一:如何将easyui的west面板上的收缩箭头隐藏?
    如图效果:
    easyui问题小结
    
    做法:
        <div data-options="region:'west'" style="200px;">
            <div class="easyui-panel" data-options="title:'功能导航',border:false,fit:true">
                <div class="easyui-accordion" data-options="fit:true,border:false">
                    <div title="系统菜单" data-options="iconCls:'icon-save'">
    <ul class="easyui-tree" data-options=
    "url:'${pageContext.request.contextPath}/menuAction!allTreeNode.action',
    parentField:'pid',lines:true,onClick:function(node){
                       var url = '${pageContext.request.contextPath}'+node.attributes.url;
                      addTab({title:node.text,href:url});}">
                  </ul> 
                    </div>
                </div>
            </div>
    </div>
      easyui问题小结
    
       1.不指定west面板的title属性就得到上一张图的效果:
        <div data-options="region:'west'" style="200px;"></div>
     easyui问题小结
    
      2.在west面板内增加一个panel面板来实现west面板的相似界面,从而影藏了箭头:title属性给panel写上即可;
     border:false让边框变窄,fit:true让面板自适应窗口变化;所得界面如上图:
        <div data-options="region:'west'" style="200px;">
            <div class="easyui-panel" data-options="title:'功能导航',border:false,fit:true">
            </div>
        </div>
    layout小扩展:设置是否显示region的收缩按钮
    http://www.easyui.info/archives/1279.html
    
    问题二:如何让layout面板中任何一个面板失去这个标题显示横条?
    待处理图:
     easyui问题小结
    
    做法:
    <div data-options="region:'east'" style="height:60px;"></div>
    不指定面板的title属性即可;
     
    问题三;如何显示一个filedSet?
    效果如图:
     easyui问题小结
    
    做法:使用<fieldset>标签
          <form id="user_login_loginForm" method="post">
           <fieldset>
            <legend>用户登录</legend>
           <table>
     <tr><</th>用户名</th><</td><input name="name" class="easyui-validatebox"
             data-options="required:true,missingMessage:'用户名为必填项'"/></>td></</tr>
                <tr></th>密码<th><td><input name="pwd" type="password"  class="easyui-validatebox"
                       data-options="required:true,missingMessage:'密码为必填项'"/></td></</tr>
           </table>
          </fieldset>
         </form>
    问题四:点击tree节点通过panel的href属性在center中载入一个页面?
      注意:panel的href属性引入的页面内容只能为该 jsp页面<body>标签内的内容,所以引入页面就不要写其它标签了,直接写需要的代码片段。Javascript直接写上即可。
    问题五:如何画一条虚线?
     效果图如下:
    
    easyui问题小结
    代码:
    <div style="380px; border-top:1px silver dashed;border-color:#99BBE8;"></div>
    问题六:如何动态改变center面板下data-options中的title属性的值?
    效果:
    easyui问题小结
    
    代码:
     $('#index_layout').layout('panel','center').panel('setTitle','当前位置》'+options.title);
     
     
    问题七:如何让combobox高度自适应:
      panelHeight: 'auto'
     
    问题八:获取data-option的宽度:
     $('#index_layout').layout('panel','east').panel("options").width;
  • 相关阅读:
    IntelliJ Idea 快速配置
    常用资源工具集合
    IntelliJ Idea 快捷键大全
    spring boot注解梳理
    boot中的Scheduling定时器使用笔记
    OKHttp使用笔记
    EasyExcel使用笔记
    自定义注解用AOP实现接口信息打印
    Java的具体集合
    linux修改系统时间
  • 原文地址:https://www.cnblogs.com/zhao123/p/3661353.html
Copyright © 2011-2022 走看看