js弹出窗口

    function openModalDialog(url, height, width) {
var t_height = 400;
var t_width = 600;
if (!isNaN(height)) {
t_height = height;
}
if (!isNaN(width)) {
t_width = width;
}
showModalDialog(url, 'newwindow',
'dialogWidth:' + t_width + 'px;dialogHeight:' + t_height + 'px;center:yes;help:yes;resizable:no;status:no')
} function openModelessDialog(url, height, width) {
var t_height = 400;
var t_width = 600;
if (!isNaN(height)) {
t_height = height;
}
if (!isNaN(width)) {
t_width = width;
}
showModelessDialog(url, 'newwindow',
'dialogWidth:' + t_width + 'px;dialogHeight:' + t_height + 'px;center:yes;help:yes;resizable:no;status:no')
} function openWindow(url, height, width) {
var t_height = 400;
var t_width = 600;
if (!isNaN(height)) {
t_height = height;
}
if (!isNaN(width)) {
t_width = width;
}
var left = (window.screen.width - t_width) / 2;
var top = (window.screen.height - t_height) / 2;
window.open(url, 'newwindow',
'resizable=no,height=' + t_height + ',width=' + t_width + ',top=' + top + ',left=' + left + ',titlebar=no ,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');
}

程序员的基础教程:菜鸟程序员

上一篇:[转]js来弹出窗口的详细说明


下一篇:js弹出窗口的学习和使用