轉自:http://www.layui.com/doc/modules/layer.html#offset
layer.open({
type: 1,//默認:0 (0表示信息框,1表示頁面層,2表示加載層)
title: "選擇單位",
offset: 't',//頂部
fixed: false,
resize: false,
content: $("#setAlias"),
area: ['80%', '36%'],
btn: ['確定', '取消']
,yes: function(index){
console.dir(index);
//do sonmething
layer.close(index);//關閉
}
});