开发者

New Window or New Tab -- Way to decide?

开发者 https://www.devze.com 2022-12-14 21:22 出处:网络
On a link, is there a way to specify whether the new _blank window is actually a new window o开发者_开发百科r a new tab?

On a link, is there a way to specify whether the new _blank window is actually a new window o开发者_开发百科r a new tab?

Thanks


There is no garuanteed way to do this. You can, however, specify height and width for you new window. Doing this will force the link to open in a new window, and not a tab in most browsers.

window.open(url, windowName, height=400, width=400);

I would caution against doing this, however. Tabs vs. windows is a user preference for a reason.


Nothing yet, but when new browsers support CSS3 we will have the ability to tab link. Take a look at http://www.w3.org/TR/2004/WD-css3-hyperlinks-20040224/#target0


No, there is not (at least not in the current HTML specifications...).

And actually, why would you want to? The user probably has set his/her browser to open either in tabs or windows depending on what the user prefers. Overriding user preferences will just piss them off :P


No, there's not.


No, there isn't.

0

精彩评论

暂无评论...
验证码 换一张
取 消