1. Trang chủ
  2. » Giáo án - Bài giảng

Code làm blog di chuyển lên

2 148 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Code làm blog di chuyển lên , xuống Phóng to || Thu nhỏ Code cực hay bạn xem Demo Code /* Top-Down scrolling window Script- © trongbang studio For full source code, visit http://bloggiaovienthaibinh.webng.com/blog/index.html This notice MUST stay intact for use */ //change to another integer to alter the scroll speed. Greater is faster var speed=1 var currentpos=0,alt=1,curpos1=0,curpos2=-1 function initialize(){ startit() } function iecompattest(){ return (document.compatMode!="BackCompat")? document.documentElement : document.body } function scrollwindow(){ if (document.all) temp=iecompattest().scrollTop else temp=window.pageYOffset if (alt==0) alt=1 else alt=0 if (alt==0) curpos1=temp else curpos2=temp if (curpos1!=curpos2){ if (document.all) currentpos=iecompattest().scrollTop+speed else currentpos=window.pageYOffset+speed window.scroll(0,currentpos) } else{ currentpos=0 window.scroll(0,currentpos) } } function startit(){ setInterval("scrollwindow()",10) } window.onload=initialize Điều chỉnh tốc độ var speed=1 Di chuyển xuống Down . Code làm blog di chuyển lên , xuống Phóng to || Thu nhỏ Code này cực hay các bạn xem Demo Code <script language="JavaScript1.2"> /* Top-Down. language="JavaScript1.2"> /* Top-Down scrolling window Script- © trongbang studio For full source code, visit http://bloggiaovienthaibinh.webng.com /blog/ index.html This notice MUST stay intact for use */ //change. startit(){ setInterval("scrollwindow()",10) } window.onload=initialize </script> Điều chỉnh tốc độ var speed=1 Di chuyển xuống thì Down

Ngày đăng: 25/09/2015, 04:03

Xem thêm: Code làm blog di chuyển lên

w