Showing posts with label chia sẻ Code hay. Show all posts
Showing posts with label chia sẻ Code hay. Show all posts

Friday, April 26, 2013

Hướng dẫn cách lấy toàn bộ bài viết từ blogger khác

Hôm nay Genk.Eus.vn sẽ hướng dẫn các bạn cách lấy data từ blog khác, hay nói cách khác là lấy bài viết từ blog khác về làm bài viết của blog mình. Nói là lấy data cho văn vẻ chứ thực ra đây là  một hình thức ăn cắp hay hack data của người khác về làm của mình. Tuy nhiên để làm được điều kiện này thì phải thỏa mãn một số điều kiện.

Điều kiện để hack data từ blog khác là blog đó phải để Cho phép nguồn cấp dữ liệu blog ở dạng Đầy đủ thì mới hack data theo cách này được.
Hình Minh họa


Đầu tiên các bạn cần  kiểm tra xem blog mà các bạn cần lấy có bao nhiêu bài viết để nhập thông số cho hợp lý bằng cách nhập đoạn mã sau vào công cụ kiểm tra

Đoạn mã code:

<script style="text/javascript">
function showpostcount(json) {
document.write('<center>Tổng số bài: <b>' + parseInt(json.feed.openSearch$totalResults.$t,10)
+ '</b></center>');}</script>
<script src="http://luubuttuoixanh.com/feeds/posts/default?alt=json-in-script&callback=showpostcount"></script>
<script style="text/javascript"></script>


Copy đoạn mã trên và nhập vào bảng kiểm tra html : Tại đây

Các bạn hãy nhớ là bao nhiêu bài viết nhé để phục vụ cho bước sau.
Bây giờ chúng ta bắt đầu lấy data  bằng cách vào link sau :

http://diachi.blogspot.com/atom.xml?redirect=false&start-index=m&max-results=n

Trong đó bạn thay các thông số như sau:


  • start-index=m bắt đầu bài đăng mới nhất
  • max-result=n lấy n bài, bắt đầu từ bài từ bài thứ m
  • diachi.blogspot.com: là blog cần lấy Data

Ví dụ: Bạn muốn lấy bài từ 1 blog bất kỳ, ví dụ ở đây tôi muốn lấy 100 bài đầu tiên từ luubuttuoixanh.com thì tôi sẽ nhập link như sau:
http://www.luubuttuoixanh.com/atom.xml?redirect=false&start-index=1&max-results=100
Nếu muốn lấy thêm 100 bài nữa thì bạn chỉ việc thay chỉ số cho phù hợp như sau:
Sau đó bạn copy link này và bật IDM lên rồi nhấn vào Add URL của IDM paste link vào đó và download về máy dạng atom.xml
Lưu ý: Mỗi lần bạn lấy nên lấy tối đa tầm 400 bài là cùng thôi. và khi  bạn Nhập blog

Bây giờ bắt đầu cài đặt những bài đăng vừa lấy của blog khác lên Blog của mình
Đăng nhập vào bloger => Cài đặt => Khác => Nhập Blog =>Import bài lên => kết quả.
Khi import xong nên đăng lấy lệ 1 vài bài để xóa bỏ capchar khi import quá nhiều bài 1 lúc, google săm soi blog sẽ cho là spam sẽ disable acc.
Hướng dẫn cách Bảo mật data blogspot:
Để tránh bị mất, bị hack data thì các bạn nên làm như sau: Đăng nhập Bloger => Cài đặt => Khác => Cho phép nguồn cấp dữ liệu blog => chọn Cho đến dấu ngắt
Hình minh họa
Chúc bạn thành công

Wednesday, March 27, 2013

Cơ bản về CSS (phần 1)

CSS là một kỹ thuật trong design web. Nó rất hiệu quả trong việc tạo layout web, tạo các thuộc tính của các phần tử trang (font chữ, kích thước chữ....). CSS phá vỡ các chuẩn mực trong Design bằng html và giúp việc design trở lên linh hoạt hơn nhờ các thẻ ID hay Class trong CSS.


Vậy CSS là gì?
CSS (Cascading Style Sheets) được hiểu một cách đơn giản đó là cách mà chúng ta thêm các kiểu hiển thị (font chữ, kích thước, màu sắc...) cho một tài liệu Web.

Các tính chất của CSS.
CSS quy định cách hiển thị của các thẻ HTML bằng cách quy định các thuộc tính của các thẻ đó (font chữ, màu sắc). Để cho thuận tiện bạn có thể đặt toàn bộ các thuộc tính của thẻ vào trong một file riêng có phần mở rộng là ".css"

Có thể khai báo CSS bằng nhiều cách khác nhau. Bạn có thể đặt đoạn CSS của bạn phía trong thẻ <head>...</head>, hoặc ghi nó ra file riêng với phần mở rộng ".css", ngoài ra bạn còn có thể đặt chúng trong từng thẻ HTML riêng biệt

Tuy nhiên tùy từng cách đặt khác nhau mà độ ưu tiên của nó cũng khác nhau. Mức độ ưu tiên của CSS sẽ theo thứ tự sau.
Style đặt trong từng thẻ HTML riêng biệt
Style đặt trong phần <head>
Style đặt trong file mở rộng .css
Style mặc định của trình duyệtMức độ ưu tiên sẽ giảm dần từ trên xuống dưới.


CSS có tính kế thừa: giả sử rằng bạn có một thẻ <div id="vidu"> đã được khai báo ở đầu file css với các thuộc tính như sau: #vidu { width: 200px; height: 300px; }
Ở một chỗ nào đó trong file css bạn lại khai báo một lần nữa thẻ <div id="vidu"> với các thuộc tính.#vidu { width: 400px; background-color: #CC0000; }
Sau đoạn khai báo này thì thẻ <div id="vidu"> sẽ có thuộc tính:#vidu { width: 400px; /* Đè lên khai báo cũ */ height: 300px; background-color: #CC0000; }

Tạo các CSS
Ví dụ để tạo một chữ đậm, có kích cỡ font là 12px, font màu là trắng, được đặt trong một box có mầu #FD9E4D và động rộng là 70px; độ cao là khoảng 30px. 
Với một yêu cầu như vậy ta sẽ có những cách thể hiện như sau:


<html>
<head>
    <title>Cơ bản về CSS </title>
    <!--Style CSS -->
    <style type="text/css">
        h1
        {
            font-size: 11px;
        }
        .cach-1
        {
            font-weight: bold;
            font-size: 12px;
            color: white;
            background: #FD9E4D;
            width: 70px;
            height: 30px;
        }
        #cach-2
        {
            font-weight: bold;
            font-size: 12px;
            color: white;
            background: #FD9E4D;
            width: 70px;
            height: 30px;
        }
    </style>
</head>
<body>
    <!--Thể hiện thuộc tính CSS trong html-->
    <!-- Phá bỏ thuộc tính html mặc định với thẻ h1-->
    <h1>
        Kích cỡ font h1 đã bị thay đổi</h1>
    <!--Với class bắt đầu bằng dấu "." và Id bắt đầu bằng "#" .2 kiểu đặt thuộc tính CSS này là giống nhau.-->
    <div class="cach-1">
        Thuộc tính CSS class</div>
    <br>
    <div id="cach-2">
        Thuộc tính CSS id</div>
    <!--Ta cũng có thể trực tiếp add CSS mà không cần đăng thuộc tính trong <style type="text/css">...</style>  bằng cách 3 -->
    <br>
    <div style="font-weight: bold; font-size: 12px; color: white; background: #FD9E4D;
        width: 70px; height: 30px">
        Thuộc tính Style trực tiếp</div>
</body>
</html>


Trong ví dụ trên vẫn là để thể hiện một chữ đậm, có kích cỡ font là 12px, font màu là trắng, được đặt trong một box có mầu #FD9E4D và động rộng là 70px; độ cao là khoảng 30px.  Nhưng ta có thể dùng tới 3 cách khác nhau. Với 3 cách này, thứ tự ưu tiên thể hiện sẽ thuộc về style > id > class.

Để gọn gàng, và dễ dàng chỉnh sửa CSS, ta sẽ thu gọn code CSS vào một file *.CSS riêng. Ví dụ trên ta copy toàn bộ CSS trong <style type="text/css">...</style>  và cho vào một file chẳng hạn là demo.css thì code trên sẽ thu gọn như sau:


<html>
<head>
    <title>Cơ bản về CSS </title>
    <!--Style CSS -->
  <link href="demo.css" rel="Stylesheet" type="text/css" />
</head>
<body>
    <!--Thể hiện thuộc tính CSS trong html-->
    <!-- Phá bỏ thuộc tính html mặc định với thẻ h1-->
    <h1>
        Kích cỡ font h1 đã bị thay đổi</h1>
    <!--Với class bắt đầu bằng dấu "." và Id bắt đầu bằng "#" .2 kiểu đặt thuộc tính CSS này là giống nhau.-->
    <div class="cach-1">
        Thuộc tính CSS class</div>
    <br>
    <div id="cach-2">
        Thuộc tính CSS id</div>
    <!--Ta cũng có thể trực tiếp add CSS mà không cần đăng thuộc tính trong <style type="text/css">...</style>  bằng cách 3 -->
    <br>
    <div style="font-weight: bold; font-size: 12px; color: white; background: #FD9E4D;
        width: 70px; height: 30px">
        Thuộc tính Style trực tiếp</div>
</body>
</html>



Tạm kết thúc bài giới thiệu về CSS cơ bản để mọi người hiểu qua về CSS là gì và cách dùng nó trong thiết kế Web như thế nào. Bài sau mình sẽ đi sau vào các thuộc tính khác. Mọi người nhớ đón đọc nhé.

Saturday, March 23, 2013

Popular Post dạng ảnh Gallery cho Blogger

Bài viết này sẽ hướng dẫn các bạn cách sửa đổi giao diện cũ nhàm chán của blogger. Trong thủ thuật này các bài viết phổ biến sẽ hiển thị dưới dạng ảnh thumbnail và có tóm tắt trên nền thumbnail đó. Tiện ích thích hợp với các blog chia sẻ hình ảnh, bán hàng. Với các blog chia sẻ thông tin thì sẽ không hợp cho lắm (tất nhiên vẫn có thể áp dụng nếu bạn thấy thích).

B1 : 
1- Đăng nhập vào Blog
2- Vào mẫu (Template)
3- Chọn Thêm Tiện ích (Add Widget)
4- Bấm chọn mục bài đăng phổ Biến(Popularposst) sau đó lưu lại
- Nếu blog bạn đã có tiện ích Popular post rồi thì có thể bỏ qua bước này tiến hành luôn bước 2
5- Bấm vào chỉnh sửa (Edit) tiện ích Bài Đăng Phổ Biến (Popularposst) bạn vừa tạo để xác định Id của tiện tích popular post và cài đặt các thông số.
B2 :
1- Chọn mẫu (template)
2- Chọn chỉnh sửa HTML.
3- Dán mã dưới đây trước thẻ ]]></b:skin> :
.PopularPosts .widget-content ul li {background:none repeat scroll 0 0 transparent;float:left;list-style:none outside none;margin:0 !important;padding: 0 !important;border-bottom:none}
.PopularPosts ul{padding:5px 0}
.PopularPosts .item-thumbnail img{width:110px;height:110px;padding:11px;margin:0}
.PopularPosts .item-content{position:relative;float:left;margin:0}
.PopularPosts .item-title a{font-size:11px;color:#fff;display:block;padding:0 5px;float:left;width:122px} .PopularPosts .item-title:hover{opacity:1;-moz-opacity:1;filter:alpha(opacity=100)}
.PopularPosts .item-thumbnail{float:left;margin:3px 1px 7px 10px;border:1px solid #ccc;overflow: hidden} .PopularPosts .item-title{background:#000;position:absolute;bottom:8px;right:2px;opacity:.6;-moz-opacity:.6;filter:alpha(opacity=6)}

Tùy chỉnh:
width:110px; là chiều rộng của hình ảnh thumbnail.
height:110px; là chiều cao của hình ảnh thumbnail.

4- Tìm code của tiện ích popular post đã tạo ở bước 1 với id PopularPostsX như sau:
<b:widget id='PopularPostsX' locked='false' title='Popular post' type='PopularPosts'/>

Với X là id tìm được ở bước 1 

- Thay thế thành đoạn code bên dưới:
<b:widget id='PopularPosts1' locked='false' title='Popular post' type='PopularPosts'> <b:includable id='main'> <b:if cond='data:title'><h2><data:title/></h2></b:if> <div class='widget-content popular-posts'> <ul> <b:loop values='data:posts' var='post'> <li> <b:if cond='data:showThumbnails == &quot;false&quot;'> <b:if cond='data:showSnippets == &quot;false&quot;'> <!-- (1) No snippet/thumbnail --> <a expr:href='data:post.href'><data:post.title/></a> <b:else/> <!-- (2) Show only snippets --> <div class='item-title'><a expr:href='data:post.href'><data:post.title/></a></div> <div class='item-snippet'><data:post.snippet/></div> </b:if> <b:else/> <b:if cond='data:showSnippets == &quot;false&quot;'> <!-- (3) Show only thumbnails --> <div class='item-content'> <b:if cond='data:post.thumbnail'> <div class='item-thumbnail'> <a expr:href='data:post.href' target='_blank'> <img alt='' border='0' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:width='data:thumbnailSize'/> </a> </div> </b:if> <div class='item-title'><a expr:href='data:post.href'><data:post.title/></a></div> </div> <div style='clear: both;'/> <b:else/> <!-- (4) Show snippets and thumbnails --> <div class='item-content'> <b:if cond='data:post.thumbnail'> <div class='item-thumbnail'> <a expr:href='data:post.href' target='_blank'> <img alt='' border='0' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:width='data:thumbnailSize'/> </a> </div> </b:if> <div class='item-title'><a expr:href='data:post.href'><data:post.title/></a></div> <div class='item-snippet'><data:post.snippet/></div> </div> <div style='clear: both;'/> </b:if> </b:if> </li> </b:loop> </ul> <b:include name='quickedit'/> </div> </b:includable> </b:widget>

Lưu lại và xem kết quả , chúc bạn thành công !

Friday, March 22, 2013

Cube 3D Slider với CSS3

Hôm nay tôi share cho các bạn code của slideshow mà tôi vừa hoàn thành (tạm đặt là cube slide) chỉ sử dụng css3. Tuy nhiên do slideshow này sử dụng css3-transform3D nên chỉ hiển thị trên trình duyệt nào hỗ trợ thuộc tính này.
Demo Online :
Link download : 

Wednesday, March 20, 2013

Share bộ rank đẹp cho forum

rank dep cho forum, user rank cho forum vbb

Share 1 vài forum rank đẹp cho các bạn, bạn nào thích thì down ở bên dưới đính kèm nhé


rank cho forum vbb













Link downloads : https://www.box.com/s/rwqfn7uvy3rnbtzfbji5

Friday, March 15, 2013

Share code Tường treo ảnh HTML5 - CSS3





Pass : eus.vn

Đã hoàn thiện xong phiên bản chạy nền blogger.
Bạn nào cần c.m ở dưới và để lại mail mình send qua nhé.

Saturday, March 9, 2013

Script hiện kích thước màn hình máy tính

Demo Hình ảnh :


 Code :

 <script type="text/javascript">
//<![CDATA[
document.write("<p class='nofound'>Kích thước màn hình của máy bạn là: " + screen.width + "x" + screen.height + "</p>");
//]]>
</script>
<!-- Genk.eus.vn -->



Demo Online : http://genk.eus.vn/coder-by-dohuytoan.dht

Script hiệu ứng mưa sao băng

Demo hình ảnh :


Code :






Demo Online :  click vào đây để xem
Khi xem demo bạn có thể click và giữ chuột để xem hiệu ứng kéo dài


Script thanh công cụ đa năng từ Wibiya.com

Demo hình ảnh :


<script src="http://cdn.wibiya.com/Toolbars/dir_0008/Toolbar_8530/Loader_8530.js" type="text/javascript"></script>
<!-- Genk.eus.vn -->


Demo Online : http://jsbin.com/uxozaf


 

Script hiệu ứng phá vỡ video

Demo Hình ảnh :


Code :

<script type="text/javascript">
//<![CDATA[
var video;
var copy;
var copycanvas;
var draw;

var TILE_WIDTH = 32;
var TILE_HEIGHT = 24;
var TILE_CENTER_WIDTH = 16;
var TILE_CENTER_HEIGHT = 12;
var SOURCERECT = {x:0, y:0, width:0, height:0};
var PAINTRECT = {x:0, y:0, width:1000, height:600};

function init(){
video = document.getElementById('sourcevid');
copycanvas = document.getElementById('sourcecopy');
copy = copycanvas.getContext('2d');
var outputcanvas = document.getElementById('output');
draw = outputcanvas.getContext('2d');
setInterval("processFrame()", 33);
}
function createTiles1k(){
var offsetX = TILE_CENTER_WIDTH+(PAINTRECT.width-SOURCERECT.width)/2;
var offsetY = TILE_CENTER_HEIGHT+(PAINTRECT.height-SOURCERECT.height)/2;
var y=0;
while(y < SOURCERECT.height){
var x=0;
while(x < SOURCERECT.width){
var tile = new Tile();
tile.videoX = x;
tile.videoY = y;
tile.originX = offsetX+x;
tile.originY = offsetY+y;
tile.currentX = tile.originX;
tile.currentY = tile.originY;
tiles.push(tile);
x+=TILE_WIDTH;
}
y+=TILE_HEIGHT;
}
}

var RAD = Math.PI/180;
var randomJump = false;
var tiles = [];
var debug = false;
function processFrame(){
if(!isNaN(video.duration)){
if(SOURCERECT.width == 0){
SOURCERECT = {x:0,y:0,width:video.videoWidth,height:video.videoHeight};
createTiles1k();
}
//this is to keep my sanity while developing
if(randomJump){
randomJump = false;
video.currentTime = Math.random()*video.duration;
}
//loop
if(video.currentTime == video.duration){
video.currentTime = 0;
}
}
var debugStr = "";

copy.drawImage(video, 0, 0);
draw.clearRect(PAINTRECT.x, PAINTRECT.y,PAINTRECT.width,PAINTRECT.height);

for(var i=0; i<tiles.length; i++){
var tile = tiles[i];
if(tile.force > 0.0001){
//expand
tile.moveX *= tile.force;
tile.moveY *= tile.force;
tile.moveRotation *= tile.force;
tile.currentX += tile.moveX;
tile.currentY += tile.moveY;
tile.rotation += tile.moveRotation;
tile.rotation %= 360;
tile.force *= 0.9;
if(tile.currentX <= 0 || tile.currentX >= PAINTRECT.width){
tile.moveX *= -1;
}
if(tile.currentY <= 0 || tile.currentY >= PAINTRECT.height){
tile.moveY *= -1;
}
}else if(tile.rotation != 0 || tile.currentX != tile.originX || tile.currentY != tile.originY){
//contract
var diffx = (tile.originX-tile.currentX)*0.2;
var diffy = (tile.originY-tile.currentY)*0.2;
var diffRot = (0-tile.rotation)*0.2;

if(Math.abs(diffx) < 0.5){
tile.currentX = tile.originX;
}else{
tile.currentX += diffx;
}
if(Math.abs(diffy) < 0.5){
tile.currentY = tile.originY;
}else{
tile.currentY += diffy;
}
if(Math.abs(diffRot) < 0.5){
tile.rotation = 0;
}else{
tile.rotation += diffRot;
}
}else{
tile.force = 0;
}
draw.save();
draw.translate(tile.currentX, tile.currentY);
draw.rotate(tile.rotation*RAD);
draw.drawImage(copycanvas, tile.videoX, tile.videoY, TILE_WIDTH, TILE_HEIGHT, -TILE_CENTER_WIDTH, -TILE_CENTER_HEIGHT, TILE_WIDTH, TILE_HEIGHT);
draw.restore();
}
if(debug){
debug = false;
document.getElementById('trace').innerHTML = debugStr;
}
}

function explode(x, y){
for(var i=0; i<tiles.length; i++){
var tile = tiles[i];

var xdiff = tile.currentX-x;
var ydiff = tile.currentY-y;
var dist = Math.sqrt(xdiff*xdiff + ydiff*ydiff);

var randRange = 220+(Math.random()*30);
var range = randRange-dist;
var force = 3*(range/randRange);
if(force > tile.force){
tile.force = force;
var radians = Math.atan2(ydiff, xdiff);
tile.moveX = Math.cos(radians);
tile.moveY = Math.sin(radians);
tile.moveRotation = 0.5-Math.random();
}
}
tiles.sort(zindexSort);
processFrame();
}
function zindexSort(a, b){
return (a.force-b.force);
}

function dropBomb(evt, obj){
var posx = 0;
var posy = 0;
var e = evt || window.event;
if (e.pageX || e.pageY){
posx = e.pageX;
posy = e.pageY;
}else if (e.clientX || e.clientY) {
posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
}
var canvasX = posx-obj.offsetLeft;
var canvasY = posy-obj.offsetTop;
explode(canvasX, canvasY);
}

function Tile(){
this.originX = 0;
this.originY = 0;
this.currentX = 0;
this.currentY = 0;
this.rotation = 0;
this.force = 0;
this.z = 0;
this.moveX= 0;
this.moveY= 0;
this.moveRotation = 0;

this.videoX = 0;
this.videoY = 0;
}

function getPixel(imageData, x, y){
var data = imageData.data;
var pos = (x + y * imageData.width) * 4;
return {r:data[pos], g:data[pos+1], b:data[pos+2], a:data[pos+3]}
}

function setPixel(imageData, x, y, pixel){
var data = imageData.data;
var pos = (x + y * imageData.width) * 4;
data[pos] = pixel.r;
data[pos+1] = pixel.g;
data[pos+2] = pixel.b;
data[pos+3] = pixel.a;
}

function copyPixel(sImageData, sx, sy, dImageData, dx, dy){
var spos = (sx + sy * sImageData.width) * 4;
var dpos = (dx + dy * dImageData.width) * 4;
dImageData.data[dpos] = sImageData.data[spos]; //R
dImageData.data[dpos+1] = sImageData.data[spos+1]; //G
dImageData.data[dpos+2] = sImageData.data[spos+2]; //B
dImageData.data[dpos+3] = sImageData.data[spos+3]; //A
}
//]]>
</script>

<body onload="init()" style="margin:0px;">

<div style="display:none">
<video id="sourcevid" autoplay="true" loop="true">
<source src="http://craftymind.com/factory/html5video/BigBuckBunny_640x360.mp4" type="video/mp4"/>
<source src="http://craftymind.com/factory/html5video/BigBuckBunny_640x360.ogv" type="video/ogg"/>
</video>
<canvas id="sourcecopy" width="640" height="360"></canvas>
</div>

<div align="center">
<canvas id="output" width="1000" height="600" onmousedown="dropBomb(event, this)" ></canvas>
</div>
</body>


Demo Online : http://jsbin.com/oyewut 



Flash phát nhạc mp3 từ Muzicons.com

Demo hình ảnh :




Code :


<object width="150" height="50" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" /><embed src="http://muzicons.com/musicon_v_srv_new.swf" width="150" height="50" menu="false" quality="high" align="middle" type="application/x-shockwave-flash" flashvars="&nomuz=muzicon%20unavailable&site=http://muzicons.com/&icon_pic=11.png&music_file=http://www.fileden.com/files/2011/7/19/3169666/With%20You%20-%20Code1k.com.mp3&bg_color=3366ff&type_of_clip=simple_text&text_color=FFFFFF&text_message=Genk.eus.vn" wmode="transparent" menu="false" quality="high"></embed></object>
<!-- Genk.eus.vn -->




Demo Online :






Script hiệu ứng rung động hình ảnh khi rê chuột

code :

<style type="text/css">
.imageCrazy_dohuytoan{
position:relative
}
</style>
<script type="text/javascript">
//<![CDATA[
var stopit=0
var rector=3
var a=1

function init(which){
stopit=0
shake=which
shake.style.left=0
shake.style.top=0
}

function rattleimage(){
if ((!document.all&&!document.getElementById)||stopit==1)
return
if (a==1){
shake.style.top=parseInt(shake.style.top)+rector
}
else if (a==2){
shake.style.left=parseInt(shake.style.left)+rector
}
else if (a==3){
shake.style.top=parseInt(shake.style.top)-rector
}
else{
shake.style.left=parseInt(shake.style.left)-rector
}
if (a<4)
a++
else
a=1
setTimeout("rattleimage()",50)
}

function stoprattle(which){
stopit=1
which.style.left=0
which.style.top=0
}
//]]>
</script>

<a href="http://www.code1k.com" target="_blank"><img onmouseout="stoprattle(this);top.focus()" border="0" onclick="top.focus()" src="http://1.bp.blogspot.com/-JvMI8xtB_ng/UCDRRv-oNOI/AAAAAAAAJfE/D-vk28dJZgY/s300/imagecrazy-code1k.com.jpg" onmouseover="init(this);rattleimage()" class="imageCrazy_dohuytoan"/></a>
<!-- Genk.eus.vn -->


Demo hình ảnh :



Demo Online : http://jsbin.com/usunun/4/edit

[Cải tiến] Script luân chuyển tiêu đề Tab trình duyệt



Code:

<script type='text/javascript'>
//<![CDATA[
step=0
function flash_title(){
step++
if (step==6) {step=1}
if (step==1) {document.title='
Genk.eus.vn'}
if (step==2) {document.title='Kênh mã nguồn Việt Nam'}
if (step==3) {document.title='Chia sẻ miễn phí'}
if (step==4) {document.title='Code phong phú đa dạng'}
if (step==5) {document.title='Code cho mọi mã nguồn'}
setTimeout("flash_title()",600);}
flash_title()
//]]>
</script>
<!-- Genk.eus.vn -->