.消逝°
HOME
:
NOTICE
:
TAG
:
RSS
:
GUESTBOOK
:
ADMIN
:
New POST
»
All category
(56)
»
Simple Life
(27)
»
Web Development
(27)
»
Music & Movie
(2)
❤ 消逝的微博
explon
tag box
art
Mootools
IP2U
CakePHP
jQuery
CSS Sprites
Yoho
Touch
ajax
随拍
办公室
小新
修路
Macbook
五道口
Mint
Micro Vault
Tattertools
php.js
Microblog
calendar
«
2010/03
»
Sun
Mon
Tue
Wed
Thu
Fri
Sat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
recent Post
PixelJunk™ Shooter
(1)
❤ Favease ~ Fashion, Art...
一些漫画
Snow Leopard
支持 onchange 事件的 Selec...
(4)
recent Comment
test
54321
01/29
test
54321
01/29
知道了
Chaussures femmes
01/13
懂了。。
gros vêtements
01/13
good......
gros vêtements
01/13
Search Results for '
PopUp
' (1 Posts)
2008/10/31
可以在所有浏览器弹出窗口的 JS
- explon
« prev
1
next »
可以在所有浏览器弹出窗口的 JS
Web Development
2008/10/31 22:42
by explon
Mobile version:
http://joyep.net/m/28
背弹式,24 小时一次,被浏览器拦截后跟随网页的 onclick 事件触发。
<script type="text/javascript"> function tbGetCookie(name) { var cookie_start = document.cookie.indexOf(name); var cookie_end = document.cookie.indexOf(";", cookie_start); return cookie_start == -1 ? '' : unescape(document.cookie.substring(cookie_start + name.length + 1, (cookie_end > cookie_start ? cookie_end : document.cookie.length))); } function tbSetCookie(cookieName, cookieValue, seconds, path, domain, secure) { var expires = new Date(); expires.setTime(expires.getTime() + seconds); document.cookie = escape(cookieName) + '=' + escape(cookieValue) + (expires ? '; expires=' + expires.toGMTString() : '') + (path ? '; path=' + path : '/') + (domain ? '; domain=' + domain : '') + (secure ? '; secure' : ''); } window.onload = function() { if (tbGetCookie('_defaultbackpop_') == 1) { return; } var tbSaveStatus = function() { var nowDate = new Date(); var nowTime = nowDate.getHours() * 3600 + nowDate.getMinutes * 60 + nowDate.getSeconds(); var DAY = 24 * 3600; var leaveTime = DAY - nowTime; tbSetCookie('_defaultbackpop_', 1, DAY, '/', document.domain); } var tbCreatePopup = function() { var adPopup = window.open('about:blank','_backad','width='+(pw||760)+',height='+(ph||480)+',toolbar=no,location=yes,directories=yes,status=yes,resizable=yes,scrollbars=yes'); adPopup.location = adUrl; adPopup.blur(); adPopup.opener.focus(); } var tbPopAd = function() { try { tbCreatePopup(); } catch (e) { document.onclick = function() { document.onclick = function () {} try { tbCreatePopup(); } catch (e) {} tbSaveStatus(); //return false; }; } finally { tbSaveStatus(); } } var adUrl = 'http://www.picturesetc.net/link/c17e24b8'; var pw = '800', ph = '600'; setTimeout(tbPopAd, 2000); } </script>
2008/10/31 22:42
2008/10/31 22:42
TAG
javascript
,
PopUp
No trackback
:
No comment
trackback url ::
http://joyep.net/trackback/28
댓글을 달아 주세요
write a comment
: name
: password
: homepage
secret
« prev
1
next »
archive
2009/12
(1)
2009/11
(1)
2009/10
(1)
2009/08
(2)
2009/07
(3)
AMAZON
link
PageCookery.
♡一个人的阳光♡.
❤ Favease.
博士英语.
夏天拥有冰的感觉.
当当购物.
漫谈 - 我们的ACG.
熊猫理想国pandago~.
韩寒.
Total :
Today :
Yesterday :
댓글을 달아 주세요