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 我的数字生活论坛 .



3 Responses to “Launch and Open Links in New Window or Tab with _blank or _new as Target in HTML and Their Difference”三反应“的发射和打开链接在新窗口或标签_blank或_new为目标,在HTML和他们的差异”

  1. Gustavo Ricou古斯塔沃里库
    July 9th, 2007 23:27 2007年7月9日23时27分
    1

    thank you…谢谢…

  2. Brian布赖恩
    December 24th, 2007 12:41 2007年12月24日12时41分
    2

    Great Post!伟大的邮政! Important piece of information.重要的一条信息。

  3. yesa
    April 10th, 2008 13:42 2008年4月10日13时42分
    3三月

    Your blog is so helpful.您的博客是如此有帮助的。 Thank you.谢谢您。

Leave a Reply离开的答复

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> 您可以使用这些标签:的<a href="" title=""> <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> <删除日期时间= “ ” >的<em>的<i> <q cite=""> <strike>的<strong>

Subscribe without commenting订阅无评论


Custom Search

New Articles新的条款,

Incoming Search Terms for the Article传入的搜索条件文章

html open link in new tab 的HTML打开链接在新标签 - - open link in new tab html 打开链接在新标签中的HTML - - html link new tab HTML链接新标签 - - html link open in new tab HTML链接在新标签中打开 - - HTML open link new tab 的HTML打开链接新标签 - - html link in new tab HTML链接在新标签 - - html target tab 目标的HTML标签 - - html open in new tab 的HTML在新标签中打开 - - html new tab 新的HTML标签 - - html link open new tab HTML链接打开新标签 - - html code Open link in new tab HTML代码打开链接在新标签 - - window.open tab window.open标签 - - href target tab href目标标签 - - html target new tab 的HTML的目标,新标签 - - HTML code to open link in new tab HTML代码,以便打开链接在新标签 - - link new tab 链接新标签 - - href new tab href新标签 - - open link in new tab html code 打开链接在新标签HTML代码 - - new tab html 新标签的HTML - - target tab 目标标签 - - open link in a new tab html 打开链接在新标签中的HTML - - link in new tab 链接在新标签 - - html open tab 开放的HTML标签 - - html open link in a new tab 的HTML打开链接在新标签 - - open link new tab html 打开链接新标签的HTML - - a href new tab 1 href新标签 - - html link to new tab HTML链接到新标签 - - a href target tab 1 href目标标签 - - link to new tab 链接到新标签 - - html open in tab 在开放的HTML标签 - - target new tab 目标新标签 - - html href new tab 新的HTML href标签 - - html open new tab 打开新的HTML标签 - - html new tab link 新标签的HTML链接 - - launch link in new window 发射链接在新窗口 - - href in new tab href在新标签 - - html code open in new tab HTML代码在新标签中打开 - - html to open link in new tab HTML到打开链接在新标签 - - html "open link in new tab" HTML文件“打开链接在新标签” - - open links in new tab html 打开链接在新标签中的HTML - - all 全部 - - html href target tab 目标的HTML href标签 - - link target new tab 链接的目标,新标签 - - code to open link in new tab 代码中打开链接在新标签 - - href open new tab href打开新标签 - - open html link in new tab 打开HTML链接在新标签 - - link in new tab html 链接在新标签中的HTML - - html opening link in new tab 开放的HTML链接在新标签 - - html link opens in new tab HTML链接开启在新标签 - - open a link in a new tab html 打开一个链接在新标签中的HTML - - target frame new tab 框架的目标,新标签 - - target-new: tab 目标新:标签 - - html code for opening link in new tab HTML代码开放链接在新标签 - - href target new tab href的目标,新标签 - - href open in new tab href在新标签中打开 - - html links open in new tab HTML链接在新标签中打开 - - link new tab html 链接新标签的HTML - - html open window in new tab 的HTML打开的窗口在新标签 - - html open in a new tab 的HTML打开一个新的标签 - - open link in new tab code 打开链接在新标签中的代码 - - html code open link new tab HTML代码打开链接新标签 - - html open link in new window tab 的HTML在新视窗开启连结标签 - - a href open new tab 1 href打开新标签 - - opening link in new tab html 开放链接在新标签中的HTML - - html open new tab link 的HTML打开新的标签连结 - - open in new tab link html 在新标签中打开链接的HTML - - _blank new tab _blank新标签 - - html code for open in new tab HTML代码,为在新标签中打开 - - html make link open in new tab 作出的HTML链接在新标签中打开 - - html link opens new tab HTML链接打开新标签 - - html open links in new tab 的HTML打开链接在新标签 - - window.open tabs window.open标签 - - open in new tab html code 在新标签中打开HTML代码 - - html target tabs 目标的HTML标签 - - open window in tab 在打开的窗口标签 - -