zoukankan      html  css  js  c++  java
  • paip.gui控件form窗体的原理实现以及easyui的新建以及编辑实现

    paip.gui控件form窗体的原理实现以及easyui的新建以及编辑实现

    //新建 与编辑

     var  EditForm=new Form_easyui();
       if(row)
           EditForm.id=row.id;
     
       EditForm.show();

    //窗体的加载
    两个方式:一个是load ajax,简单的文本可以使用这个,不适合事件的情形..
    一个是容器方式(iframe),推荐这个,,,
    main.htm ..要是放得个子窗口里面,不的出去..只能放得个父窗口里面.
    <div id="win">
        <iframe id="ifrmo3" src=""  width="100%" marginwidth="0"  height="100%" marginheight="0" frameborder="0"></iframe>
    </div>

    在sub.html,,,,parent.$('#win').window(xxx);


    作者Attilax 艾龙,  EMAIL:1466519819@qq.com
    来源:老哇的爪子 Attilax
    地址:http://blog.csdn.net/attilax

    /完整代码。subWindow.htm
    <script>

    function Form_easyui() {


            this.id=0;
            this.show = function() {
            
                var param ="cheoyoniuEdit.htm?id="+this.id;
            
                // transParam(param);
                $("#ifrmo3",parent.document.body).attr("src",param);

                //open parent winID div.. cause from subWindow start ..
                parent.$('#win').window({
                     600,
                    height: 400,
                    modal: true,
                    title: "新增"
                });
                /// open wind end
            };
            //define method end

        }
        
        //addBtn_click()
    function addWin()
    {

    ///get select obj filed (id )
      var row = $('#tablex').datagrid('getSelected');  
      //if have select ,edit model.
       if (row){        
               console.info("---get id: "+row.id);
       }else
           console.info("--- no select id ");
       
       var  EditForm=new Form_easyui();
       if(row)
           EditForm.id=row.id;
     
       EditForm.show();
       

    }

    /代码main.html
        
        <div id="win">
        <iframe id="ifrmo3" src=""  width="100%" marginwidth="0"  height="100%" marginheight="0" frameborder="0"></iframe>
        
        
        </div>
  • 相关阅读:
    RHEL7 安装Docker-CE
    Django2.2 Vue 前后端分离 无法访问Cookie
    Vue error: Parsing error: Unexpected token
    Python Warning
    Http post 接收 html .netcore
    Echart 中国地图
    CKplayer 视频播放插件
    (转)解决windows10下无法安装.net framework 3.5,错误代码0x800F081F
    第1章 信息化和信息系统
    .net core 添加 swagger
  • 原文地址:https://www.cnblogs.com/attilax/p/15199288.html
Copyright © 2011-2022 走看看