您的位置:首页 > Web前端 > JavaScript

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;");

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: