Tạo banner quảng cáo hiển thị luôn phiên cho Blogspot, Web

Loading...
Làm thế nào để hiển thị quảng cáo gọn nhẹ mà chứa được nhiều quảng cáo? Hướng dẫn cho mình cách tạo quảng cáo hiển thị thay phiên nhau trên Website, Blogspot...
- Hiển thị quảng cáo luôn phiên nhau là 1 điều Hợp lý đối với Website, Blog nào còn ít chỗ trống. Bài viết này itviet360 giới thiệu tới các bạn Code Javascript cho quảng cáo của bạn trở nên gọn nhẹ và sinh động hơn...
Quảng cáo, hien thi quang cao, Advertising

Demo tại Blog (theo yêu cầu):  Hình ảnh đẹp
- Ở đây itviet360 có 3 hình ảnh tương ứng với 3 link:
1. Link: Dịch vụ SEO Web giá rẻ
2. Link: Tải game miễn phí
3. Link: Tải game Avatar
Tương với với 3 hình ảnh (ở Code dưới)
Code:
<script type="text/javascript">
// Banner Rotation Script by Bloggerism
var ban = new Array();
var link = new Array();
var index = 0;
ban[0] = new Image();
ban[0].src = "http://1.bp.blogspot.com/-O8_uuVBE4LU/UfyGz71CYaI/AAAAAAAAOpk/Kl5KdRnRbtI/s1600/seo-gia-re.gif";
link[0] = "http://www.itviet360.com/p/dich-vu-seo-web-gia-re-giai-phap-tot.html";
ban[1] = new Image();
ban[1].src = "http://2.bp.blogspot.com/-QlI5wU2v-Nk/UfyGzx835oI/AAAAAAAAOpU/Z5td_09_Iio/s1600/taigame2-logo.png";
link[1] = "http://taigame2.blogspot.com";
ban[2] = new Image();
ban[2].src = "http://3.bp.blogspot.com/-RBEOHpCaFio/UfyGz_RMybI/AAAAAAAAOpY/cpbppTC444U/s1600/banner-avatar-1.gif";
link[2] = "http://www.itviet360.com/2013/07/tai-game-avatar-222-cho-dien-thoai-android-ios.html";
index = Math.random() * (ban.length);
index = Math.floor(index);
function rotator()
{if (index == ban.length) index = 0;
if (document.images) {
document.images.rotation.src = ban[index].src;
}
else {
document.getElementById('rotation').src=ban[index].src;
}
index++;
setTimeout('rotator()',3000);
}
function go() {window.open(link[index-1]);}
</script>
<img id="rotation" style="cursor:pointer;" src="" onclick="go();"/>
<script type="text/javascript">rotator();</script>
- Hướng dẫn làm thủ thuật trên Blogspot
1. Vào bảng điều khiển Blogger -> bố cục (layout) -> thêm tiện ích (Add a widget) -> HTML/Javascript
2. Dán Code trên vào tiện ích vừa thêm :) và lưu lại xem kết quả
Loading...
Chuyên mục: , , , ,

0 nhận xét:

Đăng một bình luận