Launch and Open Links in New Window or Tab with _blank or _new as Target in HTML and Their Difference发射和打开链接在新窗口或标签_blank或_new为目标,在HTML和他们的差异
On most websites, publishers may prefer to open the links to other web pages, especially external links that open web pages out of their own sites, in a new web browser window or tab, as most of the time, clicking on a link will load the new document from the link in the same window with where the link was.对大多数网站,出版商可能宁愿以打开链接到其他网页,尤其是外部链接,打开网页出于自己的地盘,在一个新的Web浏览器窗口或选项卡上,由于大部分的时间,点击链接将加载新文件从连接在同一窗口与地方联系。 In HTML web programming language, to launch the new document (web pages) from links in a new window or tab effect is typically done through the use of target attributes on those links.在HTML网页编程语言,推出新的文件(网页)链接在一个新窗口或标签效应通常是通过使用对象的属性对这些链接。
In this case, the link anchors will be using “_blank” as the value of the “target” attribute.在这种情况下,连接锚将使用“ _blank ”做为价值“目标”属性。 “_blank” tells the web browser to open the new document loaded from the link in a new window. “ _blank ”告诉Web浏览器打开新文件加载从连结在一个新窗口。 “target” attribute is also used in websites with frame structure to tell the web browser which frame the target page of a link should open when click. “目标”的属性也可以用来在网站上与框架结构告诉网页浏览器的框架目标网页的链接应该开放时,按一下。 However, “_blank” does not require the use of any frames.不过, “ _blank ”不需要使用任何框架。 The syntax or HTML code is typically as below:语法或HTML代码通常如下:
<a href=”newwindow.html” target=”_blank”>New Window</A>的<a href="newwindow.html" target="_blank">请新窗口< /一>
There are also publishers who use “_new” instead of “_blank” as the value for “target” attribute to open a link in new window.也有出版商谁使用“ _new ” ,而不是“ _blank ”做为价值“目标”属性来打开一个链接在新窗口。 There is actually no “_new” defined as frame target names by W3C HTML standards.有,其实是没有“ _new ”界定为框架的目标,名称由W3C的HTML标准。 The only four reserved names are “_blank”, “_parent”, “_self” and “_top”.唯一的四保留名称是“ _blank ” , “ _parent ” , “ _self ”和“ _top ” 。 However, the “_new” value works the same way as “_blank” to launch the linked web documents in new browser window because of graceful error handling by web browsers.然而, “ _new ”价值工程同样的方式“ _blank ”推出联系Web文档在新的浏览器窗口,因为优美的错误处理由Web浏览器。 So “_new” is not a valid value for “target” attribute in link <a> anchor, and may cause inconsistent behaviour for strictly HTML compliant browser that ignores all other target names as frame target name should begin with an alphabetic character (az and AZ).因此, “ _new ”是不是一个有效的价值“目标”属性在链接在<a>锚,并可能导致不一致的行为,严格的HTML浏览器,无视所有其他目标的名字作为框架的目标,名称应该开始与一字母字符( AZ和到z ) 。
When “_new” is used, the web browser will look for an existing browser window that carries the “_new” handle name.当“ _new ”是用, Web浏览器将寻找一个现有的浏览器窗口中进行“ _new ”处理的名称。 If there is none then browser will create and launch the target web document at new window (or new tab in browser that supports tabbed browsing), where browser is considered to be recovering from HTML error of targeting a non-existent window.如果没有,然后浏览器将创建并启动目标网页文件在新的窗口(或新标签在浏览器中支持标签式浏览) ,而浏览器被认为是复苏的HTML错误的,目标是不存在的窗口。 In this case, the new window will be named “_new”.在这种情况下,新窗口将被命名为“ _new ” 。 However, if a window or a tab with “_new” handle already existed, the target page will be loaded into that window instead.但是,如果一个窗口或一个标签与“ _new ”处理已经存在,目标网页会被加载到该窗口。 Theoretically, you no need to use “_new” as the value for “target”, as any other value name (ie “newwindow” or “newtab”) will work to create a new window if the so named window hasn’t existed yet when clicked on the link.从理论上讲,你没有必要使用“ _new ”作为价值“目标” ,作为任何其他数值名称(即“ newwindow ”或“ newtab ” )将致力于创建一个新的窗口,如果命名的窗口已不存在,但当点击了链接。
In other word, if you want the links to open in a new window on every click, use the “_blank”.在其他字,如果您想要的链接在新窗口中打开就每次点击,使用“ _blank ” 。 And you can use “_new” or another other valid value name starting with alphabetic character to open a new window and re-use that window for any other subsequent clicks that target to the same name.您可以使用“ _new ”或另一种有效的数值名称字母开始的性质,以打开一个新窗口,并重新使用该窗口为任何其他随后点击目标,以相同的名称。
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要说明 :这是一个机器翻译网页是“按原样”提供的担保。 Machine translation may be difficult to understand.机器翻译可能很难理解。 Please refer to请参阅 original English article英文原版的文章 whenever possible.只要有可能。
Share and contribute or get technical support and help at分享和贡献,或取得技术的支持和帮助,在 My Digital Life Forums 我的数字生活论坛 . 。
Related Articles相关文章
- How to Open Links in New Tab in Safari如何打开链接在新标签在Safari
- How to Identify and Know Where A Link Will Open in Safari如何识别和不知从何1链接将打开在Safari
- How to Open Favorites in New Tab in Internet Explorer 7 or 8 (IE7) Browser如何打开收藏在新标签在Internet Explorer 7或第8条第( 7 )浏览器
- Workaround to Open Bookmarks in New Tab in Firefox其他可行方案,以开放的书签在新标签在Firefox
- Disable FireFox Tabbed Browsing Scroll Arrows and Scrolling Tabs Feature禁用Firefox的标签页浏览滚动箭头和滚动标签功能
- How to Change Windows Explorer Default Folder如何改变Windows档案总管的默认文件夹
- Switch and Jump Tabs Keyboard Shortcuts in IE7开关和跳转的标签,键盘快捷键,在IE7中
- MySpace Blocked? MySpace上封锁? Unblock MySpace and Bypass with Proxy Access解锁MySpace和绕道与代理访问
- Firefox 2.0 Reviews and Comparisons Firefox 2.0中评语比较
- Amazon Context Links for Associates Affiliate Program亚马逊背景链接联营伙伴计划



















July 9th, 2007 23:27 2007年7月9日23时27分
thank you…谢谢…
December 24th, 2007 12:41 2007年12月24日12时41分
Great Post!伟大的邮政! Important piece of information.重要的一条信息。
April 10th, 2008 13:42 2008年4月10日13时42分
Your blog is so helpful.您的博客是如此有帮助的。 Thank you.谢谢您。