问题
I have a sidebar (right sided iframe) and when i click on a link in it, it opens a new window in IE8, (in firefox it open a new tab). What do i need to do to open links in IE8 in a new tab. I already set the Tools->Internet Options->Settings-> 'Always open pop-ups in a new tab' and 'A new tab in the current window' open in new tab but still doesn't work. My links are pretty simple, what am i missing ? exemple: text. Also some site are saying to register Regsvr32 actxprxy.dll to fix this problem, still doesn't work. And i want this to work with a simple click, no 'right-click->open in new tab' option. I also hope i won't get the 'can't change how ie8 works' answer. ;)
Here is a test file, but still not working with _blank...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<a href="http://www.google.ca" target="_blank">open in new tab</a>
</body>
</html>
Here is my ie8 parameters for tabs... alt text http://db.tt/lMhAs3
And sorry if it's all in french, i'll fix the language later.
回答1:
You need to use the target="_blank" attribute to make links open in a new window or tab. Where the link actually opens is up to the browser settings. So if you have Tools > Internet Options > Tabbed Browsing Settings > "Always open pop-ups in new tabs" selected, a target="_blank" link will open in a new tab. Note that this type of link will open in a new window by default on most browsers.
回答2:
Your settings look right, just loose the "Target" attribute in the html
The target attribute defines where the linked document will be opened.
回答3:
Just a short observation, IE (all versions) will not open a link with invalid ULR address. For example a missing slash (http:/domain.ext). It will work on other browsers tho.
来源:https://stackoverflow.com/questions/2883432/need-to-open-links-in-new-tab-in-ie8