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;width:60px;"></input>


js代码如下:

//弹出窗
function performances(){
$.dialog.setting.zIndex = getzIndex();
$.dialog({
content: 'url:saleOrderMainController.do?goPerformanceDistribution',
zIndex: getzIndex(),
title: '分配列表',
lock: true,
width: '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中调用的方法");
}