`
thrillerzw
  • 浏览: 139140 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

页面弹框

 
阅读更多

1、调用open_window("xeditor_toedit.do?type=2&pid="+id, 'new',1150,800);  
function open_window(url,name,iWidth,iHeight){
 var iTop = (window.screen.availHeight-30-iHeight)/2; //获得窗口的垂直位置;
 var iLeft = (window.screen.availWidth-10-iWidth)/2; //获得窗口的水平位置;
 window.open(url,name,'height='+iHeight+',innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=yes,resizeable=no,location=no,status=no');
}

最简单的代码:window.open ('page.html')
刷新主窗口 : window.opener.location.reload();  //window.opener 实际上就是通过window.open打开的窗体的父窗体。
向主窗口传值:window.opener.document.parentForm.testInput.value = xx;
window.opener.test(); ---调用父窗体中的test()方法
window.opener用法 : http://www.cnblogs.com/zhangzt/archive/2009/12/24/1631253.html

 

2、jquery等插件。

0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics