![]() |
| Code javascript khi click chuột vào web sẽ nhảy ra nhiều new tab |
Code này chạy như sau: Click vào web lần 1 mở ra 1 tab, click vào lần 2 nhảy ra 1 tab. Các bạn thử làm sẽ thấy.
Trước tiên bạn phảo vào phẩn chỉnh sửa code của web site và blog cảu bạn và làm theo bước sau
Bước 1: Copy đoạn code dưới đây lên trên thẻ đóng </head>
<script language='javascript'>Chú ý : Các bạn sửa lại link popup nhé
//<![CDATA[
var vinhtruong=0;
function ADS_GetCookie(Name){
var re=new RegExp(Name+"=[^;]+", "i");
if (document.cookie.match(re))
return decodeURIComponent(document.cookie.match(re)[0].split("=")[1]);
return ""
}
function ADS_SetCookie(name, value, days){
if (typeof days!="undefined"){
var expireDate = new Date()
var expstring=expireDate.setDate(expireDate.getDate()+days)
document.cookie = name+"="+decodeURIComponent(value)+"; expires="+expireDate.toGMTString()
}
else document.cookie = name+"="+decodeURIComponent(value);
}
function vtlai_popup()
{
var cookie_popup_ads = ADS_GetCookie('vinhtruong_popup_ads');
if (cookie_popup_ads=='') {
if(bittuot==0)
{
bittuot=1;
var Time_expires = 24 * 3600 * 1000;
ADS_SetCookie('bittuot_popup_ads','true',Time_expires);
var params = 'width=' + '600';
params += ', height=' + '500';
params += ',scrollbars=yes,status=1,toolbar=1,menubar=1,resizable=1,location=1,directories=1';
var vtlai_popup_0 = window.open('http://thuthuat.nhomchung.net/', 'vtlai_popup_0', params +', top=0,left=0');
var vtlai_popup_1 = window.open('http://thuthuat.nhomchung.net/', 'vtlai_popup_1', params +', top=0,left=0');
var vtlai_popup_2 = window.open('link web 3', 'vtlai_popup_2', params +', top=0,left=0');
var vtlai_popup_3 = window.open('link web 4', 'vtlai_popup_3', params +', top=0,left=0');
}
}
}
//]]>
</script>
Bước 2: Tìm thẻ <body> rổi sửa nó thành <body onclick='vtlai_popup();'>
Chúc các bạn thành công !
Xem thêm >> Tạo một widget Random Post nằm ngang có thumbnail ảnh


0 nhận xét:
Đăng nhận xét