在Blogger中,如何在新標簽頁中打開鏈接???
我用的是一個普通的免費模板,只有幾頁
我需要知道如何打開新標簽中的相應鏈接時,點擊其各自的文本。
例如,我點擊了我網站上的“我們的服務”頁面,然后它應該會在一個新的標簽頁中打開link-10:examplee.com
我已經嘗試使用target='_blank ',但它對我不起作用。 以下是代碼:-
<b:widget id='LinkList210' locked='true' title='Menu' type='LinkList'
version='1'>
<b:widget-settings>
<b:widget-setting name='text-9'>Documentation</b:widget-setting>
<b:widget-setting name='link-9'>http://www.example.com</b:widget-setting>
<b:widget-setting name='text-8'> Services</b:widget-setting>
<b:widget-setting name='link-7'>http://example.com</b:widget-setting>
<b:widget-setting name='link-8'>http://www.example.com</b:widget-setting>
<b:widget-setting name='text-10'>our services</b:widget-setting>
<b:widget-setting name='link-5'>http:example</b:widget-setting>
<b:widget-setting name='link-6'>http://www.example.com</b:widget-setting>
<b:widget-setting name='link-3'>#</b:widget-setting>
<b:widget-setting name='link-4'>#</b:widget-setting>
<b:widget-setting name='text-1'>_Multi Dropdown</b:widget-setting>
<b:widget-setting name='text-0'>Features</b:widget-setting>
<b:widget-setting name='text-3'>__Dropdown 2</b:widget-setting>
<b:widget-setting name='text-2'>__Dropdown 1</b:widget-setting>
<b:widget-setting name='text-5'>_ShortCodes</b:widget-setting>
<b:widget-setting name='text-4'>__Dropdown 3</b:widget-setting>
<b:widget-setting name='text-7'>_Error Page</b:widget-setting>
<b:widget-setting name='text-6'>_SiteMap</b:widget-setting>
<b:widget-setting name='sorting'>NONE</b:widget-setting>
<b:widget-setting name='link-1'>#</b:widget-setting>
<b:widget-setting name='link-2'>#</b:widget-setting>
<b:widget-setting name='link-0'>#</b:widget-setting>
<b:widget-setting name='link-10'>http://examplee.com/</b:widget-setting>
</b:widget-settings>
<b:includable id='main'>
<div class='widget-content'>
<ul itemscope='' itemtype='http://schema.org/SiteNavigationElement'>
<li><a expr:href='data:blog.homepageUrl' target='_blank'>Home</a></li>
<b:loop values='data:links' var='link'>
<li itemprop='name'><a expr:href='data:link.target' itemprop='url' target='_blank'> <data:link.name/></a></li>
</b:loop>
</ul>
</div>
</b:includable>
</b:widget>
您可以使用它在blogger的新選項卡中獲取鏈接
<a href="#" onClick="window.open('index.html','_blanck')">open in new tab</a>
這里有一個簡單的方法:制作內部頁面(_self)鏈接,創建一個頁面列表。對于要在新標簽頁/窗口中打開的鏈接(_空白),創建一個鏈接列表并轉到模板/編輯html。點擊跳轉到部件,并選擇鏈接列表。您將看到類似這樣的內容:
<b:widget id='LinkList1' locked='false' title='Our Channels' type='LinkList' version='1'>
<b:widget-settings>
<b:widget-setting name='text-0'>Facebook</b:widget-setting>
<b:widget-setting name='link-0'>https://facebook.com/yourpage</b:widget-settings>
<b:includable id='main'>
<b:if cond='data:title != ""'><h2><data:title/></h2></b:if>
<div class='widget-content'>
<ul>
<b:loop values='data:links' var='link'>
<li><a expr:href='data:link.target'><data:link.name/></a></li>
</b:loop>
現在,轉到“li”部分,添加target='_blank '。像這樣:
<li><a expr:href='data:link.target' target='_blank'><data:link.name/></a></li>
搞定了。此鏈接列表中的所有鏈接將在新的選項卡/窗口中打開。