首先:使用href属性,加载html页面,页面中地图打开失败。
经过测试,如果easyui dialog的地址属性用href超链接,easyui 不会加载整个url页面,只会截取url目标页的body体间的html。
easyui官网上关于href属性的说明是:
属性href,类型string,一个URL,用它加载远程数据并且显示咋面板(panel)里。请注意,除非面板(panel)打开,否则内容不会被加载。这对创建一个惰性加载的面板(panel)很有用。
然后:使用content属性,地图打开成功。
top.$("<div/>").dialog({
title: '位置',
iconCls: 'icon-search',
width: 1100,
height: 600,
modal: true,
content:"<iframe scrolling='auto' frameborder='0' src='Location.htm' style='width:100%; height:100%; display:block;'></iframe>",
queryParams: {
value: value
},
onClose: function () {
$(this).dialog('destroy');
}
})