![]() |
|
Elevator v2.0 - Printable Version +- HN-Community (https://hacker-newbie.org) +-- Forum: Miscellaneous (https://hacker-newbie.org/forum-86.html) +--- Forum: Coding/Programing (https://hacker-newbie.org/forum-19.html) +---- Forum: Aplication Programing (https://hacker-newbie.org/forum-39.html) +---- Thread: Elevator v2.0 (/thread-1719.html) |
Elevator v2.0 - akatsuchi - 01-20-2010 Ini adalah sebuah aplikasi yang akan menampilkan sebuah objek baik berupa gambar atau semacam'a di sebelah kiri layar browser secara menaik dan menurun dalam interval speed tertentu... Code: <html>
<head>
<title>Elevator Dhtml Script for IE and Netscape</title> </head> <body bgcolor="#000000" link="#0000ff" vlink="#0000ff" topMargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<div id="point1" STYLE="position:absolute;visibility:visible;">
<!--Please delete this table and insert into your html elements-->
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<a href="http://www.freetutorialwebsite.com">
width="500" height="80">
<param name="movie" value="mirzailhami.swf">
<param name="quality" value="high">
<embed src="mirzailhami.swf" quality="high" width="500" height="80"></embed>
</object> </td>
</tr>
</table>
<!--End of the customizable area, please do not delete div the tag -->
</div>
<script> var XX=10; // X position of the scrolling objects
var xstep=1;
var delay_time=60; //Begin of the unchangable area, please do not modify this area
var YY=0;
var ch=0;
var oh=0;
var yon=0;
var agent = navigator.userAgent.toLowerCase();
var brw=3; NSBr=(document.layers);
IEBr=(document.all);
isDOM=((document.getElementById)&&(!IEBr))?true:false;
if(IEBr){brw=1;}
if(NSBr){brw=2;}
if(isDOM){brw=3;} if(brw==1)
{
YY=document.body.clientHeight;
point1.style.top=YY;
}
else if(brw==2)
{
YY=window.innerHeight;
document.point1.pageY=YY;
document.point1.visibility="hidden";
}
else if(brw==3)
{
YY=innerWidth;
document.getElementById("point1").style.top=YY+"px";
}
function reloc1()
{ if(yon==0){YY=YY-xstep;}
else{YY=YY+xstep;}
if(brw==1)
{
ch=document.body.clientHeight;
oh=point1.offsetHeight;
}
else if(brw==2)
{
ch=window.innerHeight;
oh=document.point1.clip.height;
}
else if(brw==3)
{
ch=innerHeight;
oh=document.getElementById("point1").offsetHeight;
}
if(YY<0){yon=1;YY=0;}
if(YY>=(ch-oh)){yon=0;YY=(ch-oh);}
if(brw==1)
{
point1.style.left=XX;
point1.style.top=YY+document.body.scrollTop;
}
else if(brw==2)
{
document.point1.pageX=XX;
document.point1.pageY=YY+window.pageYOffset;
}
else if(brw==3)
{
document.getElementById("point1").style.
left=XX+"px";
document.getElementById("point1").style.
top=YY+pageYOffset+"px";
}
} function onad()
{
if(brw==2){document.point1.visibility="visible";}
loopfunc();
}
function loopfunc()
{
reloc1();
setTimeout('loopfunc()',delay_time);
}
setTimeout('onad()',1000);
</script>
<!--End of the unchangable area -->
</body>
</html> |