zoukankan      html  css  js  c++  java
  • jeecg中自定义dialog,实现窗体的弹出

    自定一个dialog,在子窗体中写一个方法,然后通过iframe进行调取
    function createwindowoktext(title, addurl,width,height,oktext,canceltext) {
    width = width?700;
    height = height?height:400;
    if(width=="100%" || height=="100%")

    { width = window.top.document.body.offsetWidth; height =window.top.document.body.offsetHeight-100; }

    if(typeof(windowapi) == 'undefined'){
    $.dialog({
    content: 'url:'+addurl,
    lock : true,
    //zIndex:1990,
    width,
    height:height,
    title:title,
    opacity : 0.3,
    cache:false,
    ok: function()

    { iframe = this.iframe.contentWindow;

    var orgIds=iframe.getDomianIds();

    var orgNames = iframe.getDomian(); //alert(orgId);

    $("input[name='domainIdStr']").attr("value",orgIds);

    $("input[name='domainStrs']").attr("value",orgNames);

    //saveObj();

    return true; }

    ,
    okVal:oktext,
    cancelVal: canceltext,
    cancel: true /为true等价于function(){}/
    }).zindex();
    }else{
    W.$.dialog({
    content: 'url:'+addurl,
    lock : true,
    width,
    //zIndex:1990,
    height:height,
    parent:windowapi,
    title:title,
    opacity : 0.3,
    cache:false,
    ok: function()

    { iframe = this.iframe.contentWindow; var orgIds=iframe.getDomianIds(); var orgNames = iframe.getDomian(); //alert(orgId); $("input[name='domainIdStr']").attr("value",orgIds); $("input[name='domainStrs']").attr("value",orgNames); //saveObj(); return true; }

    ,
    okVal:oktext,
    cancelVal: canceltext,
    cancel: true /为true等价于function(){}/
    }).zindex();
    }

    }

  • 相关阅读:
    Vue学习-Day1
    Shell脚本学习
    Linux基础
    C# int.Parse()、int.TryParse()与Convert.ToInt32()的区别
    windows下跑python flask,环境配置
    linq性能剖析
    servicestack操作redis
    程序员福利各大平台免费接口非常适用
    ASP.NET下跨应用共享Session和使用Redis进行Session托管简介
    Web Farm和Web Garden的区别
  • 原文地址:https://www.cnblogs.com/xwgcxk/p/7239526.html
Copyright © 2011-2022 走看看