jsp弹出框之快速导航

来源:互联网 发布:opentsdb java开发 编辑:程序博客网 时间:2024/05/15 05:42

最初是使用的弹出层的方式,最后的效果不太理想。(其实是可以弄好的)。

后来使用了window.open()的方式:(注意:window.opener.location.href ="")

var treeVisable = false;var child;$("#showHideTree").on("click",function(){if(!treeVisable){treeVisable = true;if(child==undefined || child.closed){child = window.open("${rootUrl }app/pop/child","_blank","width=300,height=400,top=180,left=1010",true);}child.focus();}else{treeVisable = false;if(child.closed){child = window.open("${rootUrl }app/pop/child","_blank","width=300,height=400,top=180,left=1010",true);treeVisable = true;}}});

会打开指定的子页面,子页面有快速导航。

缺点:存在bug:页面刷新时,点击显示子页面的会出现多余的子窗口。


最终采用了更方便的第三方弹出框插件:ymPromot。

ymPrompt.win({message:'${rootUrl }app/pop/child',title:'快速导航',fixPosition:true,width:215,height:490,winPos:'lb',showMask:false,iframe:true,handler:handClose})

结合cookie的使用,初步完成的快速导航。

0 0
原创粉丝点击