我稍微搜索了一下,但是并没有找到这是否可行。我想使用window.open()
方法打开链接到窗口的可用宽度和高度。类似于以下代码。
var h = $(window).height();
var w = $(window).width();
$('#window-opener').live('click',function (e) {
window.open(this.href, 'Resource', 'toolbar=no ,location=0, status=no, titlebar=no, menubar=no,
width='+w',
height='+h);
e.preventDefault();
});
这可行吗?如果不行,有没有人能推荐类似的方法。