easyui 根据当前位置确定弹出dialog的位置

1.首先确定当前位置,jquery的offset()方法。
2.在打开对话框时不用$(“#dd”).(“open”)方法,要用窗体的resize方法重新定义大小。
例如:

var top=$("#addPictureBtn").offset().top;
var left=$("#addPictureBtn").offset().left:

$("#addpictureDiloage").window("open").("resize",{width:"50%",height:"400px",top:top,left:left});

猜你喜欢

转载自blog.csdn.net/maying0124/article/details/80688785