Header Ads Widget

Cách Tạo Banner chạy slideshow hướng dẫn chi tiết hình ảnh

muabanjaovat.blogspot.com  xin chia sẻ với các bạn cách Tạo Banner chạy slideshow

Link DEMO

Các bước cần thực hiện



1.  đăng nhập blog yêu của các bạn



2. thêm tiện ích bằng cách

    Chọn bố cục -> thêm tiện ích -> HTML/JAVA

3. OK. vậy là các bạn gần xong rùi.
   sau đó các bạn coppy và paste đoạn code sau cho mình
   <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://witty.mcduck.eu/images/layout/banner2.jpg";
link[0] = "#";
ban[1] = new Image();
ban[1].src = "http://tamanlac.vn/wp-content/themes/temple/images/top-banner.png";
link[1] = "#";
ban[2] = new Image();
ban[2].src = "http://data.sinhvienit.net/2012/T08/img/SinhVienIT.NET---halloween.png";
link[2] = "#";
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(); width:930px;-webkit-border-radius: 10PX;moz-border-radius:10px;"/>
<script type="text/javascript">rotator();</script>


4. bây giờ các bạn lưu lại và tận hưởng nhé


5. Chú Ý nè.

Đoạn code mình tô màu xanh thì các bạn trỏ tới link ảnh của bạn nhé
Đoạn code mình tô màu đỏ thì các bạn paste link khi click nhé
Đoạn code mình tô màu cam thì là thời gian chạy hình nhé. các bạn đổi tùy thích nhé


Cảm ơn các bạn ghé thăm blog muabanjaovat.blogspot.com



Đăng nhận xét

0 Nhận xét