lhgdialog: iframe页面里面的,确定,关闭、取消按钮的操作
如果你正在用lhgdialog,用他人iframe,或者 content:'url:http://www.baidu.com/a.html',的功能,刚好a.html页面有,一个关闭/取消按钮。当你模拟操作,想取消弹出框,就是点击取消按钮。那么这个取消按钮的代码怎么写呢 ?
看图:
方法一:
直接在 取消按钮上面增加onlick事件
onclick="frameElement.api.close()"
方法二:
在a.html页面定义变量,
var api = frameElement.api, W = api.opener;
然后在 取消的那个按钮上写onclick
onclick="api.close();"
---------------------------------------------------------------------------
frameElement.api.close(); //关闭弹出窗口
frameElement.api.reload(frameElement.lhgDG);//刷新父窗口