zoukankan      html  css  js  c++  java
  • jQuery的dialog弹窗实现

    jQuery实现dialog弹窗:

    html代码如下:

    <input type="button" onclick="performances();" value="分配" style="background:#18a689 none repeat scroll 0 0;border:1px solid #18a689;color:#FFF;text-shadow:0px -1px 1px #1c6a9e;height:30px;60px;"></input>

    js代码如下:

          //弹出窗
          function performances(){
              $.dialog.setting.zIndex = getzIndex(); 
            $.dialog({
                content: 'url:saleOrderMainController.do?goPerformanceDistribution', 
                zIndex: getzIndex(), 
                title: '分配列表', 
                lock: true, 
                 '600px', 
                height: '400px',
                opacity: 0.4,
                button: [
                    {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackPerformance, focus: true},
                       {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
                   ]
            }).zindex();
          }
          
            //点击确定回调函数
          function callbackPerformance() {
              var iframe = this.iframe.contentWindow;
              var cno = iframe.$("#cnossss").val();
              $('#performance').val(cno);
              //如果返回false,dialog弹窗将不会关闭,如果返回true,dialog弹窗将会关闭
            if(1!=1){
                  //调用子页面函数
                  iframe.childrenAlert();
               return false;
            }      
        }

     子页面中调用的js方法:

    function childrenAlert() {
        $.messager.alert("温馨提示","我是从父页面的js中调用的方法"); 
    }
  • 相关阅读:
    开课博客
    高级UI组件(二)
    《梦断代码》读后感(三)
    高级UI组件
    今日总结
    今日总结
    android中关于时间的控件
    单选按钮和复选框
    Android开发中按钮的语法
    布局管理器的嵌套
  • 原文地址:https://www.cnblogs.com/shuilangyizu/p/8686550.html
Copyright © 2011-2022 走看看