打开dialog和调用子页面的js代码。
function openAdd() {
$("#dialog").dialog("open");
}
$("#dialog").dialog({
title: 'your title',
modal: true,
content: "<iframe scrolling='auto' frameborder='0' src='/app01/indoortest_add/' style='width:100%; height:100%; display:block;'></iframe>",
buttons: [{
text:'Ok',
iconCls:'icon-ok',
handler:function(){
alert(“ok”)
}
},{
text:'Cancel',
handler:function(){
alert('cancel');;
}
}]
});
获取iframe
iframe得到外部数据