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.在大多數網站,出版商可能更喜歡打開鏈接到其他網頁,尤其是外部鏈接的網頁上公開了自己的網站,在一個新的網絡瀏覽器窗口或標籤,因為大多數時間裡,點擊一個鏈接將負載新文件的鏈接在同一窗口的聯繫。 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 ”講述了網頁瀏覽器打開新文件加載的鏈接在一個新窗口。 “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 ”推出的網頁鏈接文件的新瀏覽器窗口,因為優美的錯誤處理的網頁瀏覽器。 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和亞利桑那州) 。

When “_new” is used, the web browser will look for an existing browser window that carries the “_new” handle name.當“ _new ”的使用,網頁瀏覽器將尋找一個現有的瀏覽器窗口中開展了“ _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 我的數字生活論壇 .



4 Responses to “Launch and Open Links in New Window or Tab with _blank or _new as Target in HTML and Their Difference”第4響應“啟動和打開鏈接在新窗口或標籤與_blank或_new為目標的HTML和它們的差異”

  1. Gustavo Ricou古斯塔沃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月一十日13:42
    3

    Your blog is so helpful.您的博客是有益的。 Thank you.謝謝您。

  4. DanS中的
    November 7th, 2008 19:55 08年11月7號19:55
    4

    Very helpful.非常有幫助。 Wondering if there’sa way to provide some sort of command to make the URL open in a tab only.如果有想知道的方式提供某種形式的命令作出的網址打開一個標籤只。

    Any thoughts or knowledge is most appreciated!任何思想或知識是最讚賞!

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> 您可以使用這些標籤: href="" title="">的<a <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> “刪除日期時間= “ ” “的<em> <i> <q cite=""> <strike>的<strong>

Subscribe to comments feature has been disabled. 訂閱評論功能已被禁用。 To receive notification of latest comments posted, subscribe to 收到通知的最新評論張貼,訂閱 My Digital Life Comments RSS feed 我國數字化生活的評論RSS種子 or register to receive 接收登記 new comments in daily email digest. 中新評論的電子郵件,每天消化。
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 目標一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 敞開的窗戶在標籤 - -