
Bạn có thể tham khảo bài viết mà VnBlognet đã giới thiệu cách Mở Link với blogger trong cửa sổ trình duyệt mới bằng script của anhvo.
Với thủ thuật này các link liên kết ngoài sẽ có biểu tượng

Xem Demo
Cách thực hiện như sau:

- Bạn truy cập vào tài khoản Blogger: Bảng điều khiển (Dashboard) ..>>.. Thiết kế (Design) ..>>.. Chỉnh sửa HTML (Edit HTML)
- Tìm (Ctrl-F) đoạn tag </head>

- Dán vào trước đoạn tag </head> đoạn mã dưới đây:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>- Lưu mẫu (Save Template).
<script type="text/javascript">
/*
jQuery - External Links
Created by Andrea Cima Serniotti - http://www.madeincima.eu
*/
$(document).ready(function () {
// ---- External Links ----------------------------------------------------------------------------------------------------
$("a[href*='http://']:not([href*='"+location.hostname+"']),[href*='https://']:not([href*='"+location.hostname+"'])").attr("target","_blank").attr("title","Opens new window").addClass("external");
});
</script>
<style type="text/css">
.external{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmQo3O1mc-ESYphwqmmFVPkCpaJdYauI_CDK7ei7YPaImD2pkQo0Q-Y4A1BONbkKLJvxPtJuCUypFEx8Iql07ywIFngP3wrjoeFn4dEX-ym4cR1iUFnbXjLdp3JGVUMEbup_AJ8kQgB2w/s1600/external_link.gif) top right no-repeat;padding-right:18px}
</style>
Giờ đây các liên kết ngoài của blog sẽ được mở bởi cửa sổ trình duyệt mới. Bạn có thể tham khảo chi tiết bài gốc tại Bài gốc - Tiếng Anh
Gửi bài viết này cho bạn bè qua Y!M:
0 nhận xét:
Đăng nhận xét