Code Pop Up Mở Ra Cửa Sổ Mới

Trước thẻ </head>



<!-- Code Popup 2 cua so-->
<script type='text/javascript'>
function addEvent(obj, eventName, func)
{
if (obj.attachEvent){
obj.attachEvent(&quot;on&quot; + eventName, func);}
else if(obj.addEventListener){
obj.addEventListener(eventName, func, true);}
else{
obj[&quot;on&quot; + eventName] = func;}
}
addEvent(window, &quot;load&quot;, function(e){
addEvent(document.body, &quot;click&quot;, function(e)
{
// -------------- Cau hinh chung cho cua so popup  --------------------
var params = 'height='+screen.height+',width=' + screen.width + ',left=0,top=0,location=1,toolbar=1,status=1,menubar=1,scrollbars=1,resizable=1';
// -------------- pop 1 --------------------
if(document.cookie.indexOf(&quot;pop1&quot;) == -1)
{
document.cookie = &quot;popunder=pop1&quot;;    
var w = window.open(&quot;http://bikeishop.com&quot;,'bikeishop.com', params);
if (w)
{
document.cookie = &quot;popunder=pop1&quot;;
w.blur();   
}
window.focus();
}
// -------------- pop 2 --------------------
if(document.cookie.indexOf(&quot;pop2&quot;) == -1)
{       
var w = window.open(&quot;http://cothebanchuabiet.bikeishop.com&quot;,'cothebanchuabiet', params);
if (w)
{
document.cookie = &quot;popunder2=pop2&quot;;
w.blur();
}     
window.focus();
}
// -------------------- het-----------------
});
});

</script>
<!-- /Code Popup 2 cua so-->

0 nhận xét:

Đăng nhận xét