Pages

Selasa, 01 Februari 2011

Source Kode Iklan Melayang

Source code untuk menampilkan iklan melayang dengan tombol close satu kali :

<style type='text/css'>
#gb{
position:fixed;
top:350px;
z-index:+1000;
}
* html #gb{position:relative;}


.gbcontent{
float:right;
border:2px solid #A5BD51;
background:#ffffff;
padding:10px;
}
</style>

<script type='text/javascript'>
function showHideGB(){
var gb = document.getElementById(&quot;gb&quot;);
var w = gb.offsetWidth;
gb.opened ? moveGB(0, 30-w) : moveGB(20-w, 0);
gb.opened = !gb.opened;

}
function moveGB(x0, xf){
var gb = document.getElementById(&quot;gb&quot;);
var dx = Math.abs(x0-xf) &gt; 10 ? 5 : 1;
var dir = xf&gt;x0 ? 1 : -1;
var x = x0 + dx * dir-100;
gb.style.top = x.toString() + &quot;px&quot;;
if(x0!=xf){setTimeout(&quot;moveGB(&quot;+x+&quot;, &quot;+xf+&quot;)&quot;, 10);}
}
</script>

<div id='gb'>

<div class='gbtab' onclick='showHideGB()'> </div>

<div class='gbcontent'>


<center>


pasang kode disini

</center>

<div style='text-align:right'>
<a href='javascript:showHideGB()'>
.:[Close]:.
</a>
</div>
<script type='text/javascript'>
var gb = document.getElementById(&quot;gb&quot;);
gb.style.center = (30-gb.offsetWidth).toString() + &quot;px&quot;;
</script></div></div>

Pantas untuk di coba

0 komentar:

Posting Komentar

Loading...


Mau punya buku tamu seperti ini?
Klik di sini
Get This Gadget