果easyui dialog的地址属性用href超链接,easyui 不会加载整个url页面,只会截取url目标页的body体间的html
easyui官网上关于href属性的说明是:
属性href,类型string,一个URL,用它加载远程数据并且显示咋面板(panel)里。请注意,除非面板(panel)打开,否则内容不会被加载。这对创建一个惰性加载的面板(panel)很有用。
使用content属性,成功。
html代码:
<$("#dialog").dialog({ title:'your title', width:1000, height:600, modal:true, content:"<iframe scrolling='auto' frameborder='0' src='aaa.html' style='width:100%; height:100%; display:block;'></iframe>" }); $("#dialog").dialog("open"); // 打开dialogdiv id="dialog" class="easyui-dialog" closed="true"></div>
成功!
注意:用此种方式的时候,在html代码的<div>中必须写class="easyui-dialog"这个属性。否则会弹出很多错误。