Blog tip: Make Links Open In A New Window

If you design your blogs, with lots of links to other blogs and web sites, you probably like to make the links to the other blogs and web sites open in a new browser tab or window (depending upon reader preference). That helps with reader retention (for you), and increases convenience (for your readers).

If you want all links in your blog to open in a new window, you can do this with a simple template change (but do this with discretion). If you want specific links to open in a new window, you have to code each link individually.

Here's a tip.

Whether you want a link in a linked image, in a link list, or in a post, to open in a new window, you have to edit the HTML gadget, the link list, or the post, as HTML, and manually insert the short link modification

target="_blank"

Just easy and useful. One minute to do that.

Other way is you can do with there step
Other way is you can do with there step
1. Go to Blogger > Layout > Edit HTML

2. Find (Ctrl-F) : </body>

3. Replace </body> by :

<script type="text/javascript">
//<![CDATA[
function changetargetlink(x){
var a = document.getElementsByTagName('a');
var args = changetargetlink.arguments;
for(var i in a){
a[i].target = "_blank";
a[i].rel = "_blank";
for(var j=0;j<args.length;j++){
if(a[i].href.match(args[j])){
a[i].target = "";
a[i].rel = "";
}}}}
changetargetlink('hrelax.co.cc','xyz.com');
//]]>
</script>

</body>

You can replace hrelax.co.cc or xyz.com by others site which you do not want to open at new windows.

That experience I apply when I use for my blog.
Updated 9June2010