js中window.open()和window.showModalDialog()窗体大小设置
2012-02-10 16:59
525 查看
function openwin(url,wh,hg,lf,tp)
{
var xLeft=(window.screen.width-wh)/2;
var yTop=(window.screen.height-hg)/2;
var newwin=window.open(url,"newwin","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=auto,width="+wh+",height="+hg+",left="+xLeft+",top="+yTop);
newwin.focus();
return false;
}
function showModalDialogWin(url,wh,hg) {
var obj = window.showModalDialog(url, window,"status:false;dialogWidth:"+wh+"px;dialogHeight:"+hg+"px;scrollbar=no;help: no;resizable:no;status:no;");
}
{
var xLeft=(window.screen.width-wh)/2;
var yTop=(window.screen.height-hg)/2;
var newwin=window.open(url,"newwin","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=auto,width="+wh+",height="+hg+",left="+xLeft+",top="+yTop);
newwin.focus();
return false;
}
function showModalDialogWin(url,wh,hg) {
var obj = window.showModalDialog(url, window,"status:false;dialogWidth:"+wh+"px;dialogHeight:"+hg+"px;scrollbar=no;help: no;resizable:no;status:no;");
}
相关文章推荐
- Js窗体window大小设置
- JS窗口问题处理:使弹出窗口保持前端显示的几种方法,及window窗体对象open()和showModalDialog()用法
- Js针对window窗体大小设置
- js window.open 打开新窗体 参数设置
- Js窗体window大小设置
- JS窗口问题处理:使弹出窗口保持前端显示的几种方法,及window窗体对象open()和showModalDialog()用法
- Js窗体window大小设置
- JS窗口问题处理:使弹出窗口保持前端显示的几种方法,及window窗体对象open()和showModalDialog()用法
- JS窗口问题处理:使弹出窗口保持前端显示的几种方法,及window窗体对象open()和showModalDialog()用法
- 转 Js窗体window大小设置
- .net下导致Session失效的一种情况:js教本中使用window.open和window.showModalDialog时需要注意
- javascript中window窗体对象open()和showModalDialog()用法
- js的window.showModalDialog及window.open用法实例分析
- window窗体对象open()和showModalDialog()用法
- ie6与ie7 Window.Open() 和window.showModalDialog()窗体大小和刷新
- JS弹窗方式:window.open和window.showModalDialog
- js window.open()弹出窗口参数说明及居中设置
- window窗体对象open()和showModalDialog()用法
- window窗体对象open()和showModalDialog()用法
- js的window.showModalDialog及window.open用法实例分析