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

Mã code chèn flash chay hai bên Web

2 346 0

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

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 2
Dung lượng 32 KB

Nội dung

<style type="text/css"> .float { slideads1 {text-align:left} .slideads2 {text-align:right} </style> </head> <div style="width: 10px;height: 0px;"> <div id="a" class="float"><a HREF=" http://my.opera.com/votakha/albums/showpic.dml?album=900434&picture=12320004 "><img " width="100" align="right" border="0" height="228"></a><br><a HREF=" http://files.myopera.com/votakha/albums/900434/kha.jpghttp://files.myopera.com/votakh a/albums/900434/kha.jpg " border="0"></a></div> <div id="c" class="float"><a href="http:// my.opera.com " target="_blank"><img src="http://files.myopera.com/votakha/albums/900434/kha.jpg" width="100" align="right" border="0" height="228"></a></div> </div> </body> <script type="text/javascript"> function setPosition(id, position) { var store = { ram : { top : 0, left : 0, right : 0, bottom : 0 }, rom : { top : null, left : null, right : null, bottom : null } }; for (var i in position) {store.rom[i] = position[i];} var element = document.getElementById(id); for (i in store) {element[i] = store[i];} element.rom.move = function() { if (window.innerHeight) { var topPage = window.pageYOffset; var leftPage = window.pageXOffset; var rightPage = leftPage + window.innerWidth - element.offsetWidth; var bottomPage = topPage + window.innerHeight - element.offsetHeight; } else { var topPage = document.body.scrollTop; var leftPage = document.body.scrollLeft; var rightPage = leftPage + document.body.clientWidth - element.offsetWidth; var bottomPage = topPage + document.body.clientHeight - element.offsetHeight; } element.style.position = "absolute"; if (element.rom.top != null) { element.ram.top += Math.round((topPage + element.rom.top - element.ram.top)/20); element.style.top = element.ram.top; } if (element.rom.left != null) { element.ram.left += Math.round((leftPage + element.rom.left - element.ram.left)/20); element.style.left = element.ram.left; } if (element.rom.right != null) { element.ram.right += Math.round((rightPage - element.rom.right - element.ram.right)/20); element.style.left = element.ram.right; } if (element.rom.bottom != null) { element.ram.bottom += Math.round((bottomPage - element.rom.bottom - element.ram.bottom)/20); element.style.top = element.ram.bottom; } setTimeout("document.getElementById('"+element.id+"').rom.move()",10); }; element.rom.move(); } setPosition("a", {top: 0, left: 903}); setPosition("c", {top: 0, left: 0}); </script>

Ngày đăng: 07/07/2014, 00:00

TỪ KHÓA LIÊN QUAN

w