PDA

View Full Version : BBcode cửa sổ bay.



chihong
22-01-2009, 03:24 PM
Cách sử dụng




Mã HTML thay thế


<HTML>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<head>
<script>
var x=0; // tọa độ x của window
var y=0; // tọa độ y của window
var Co=1;

function QuyDao()
{
if(Co==1)
{
if(x<14)
{
x+=1;
window.setTimeout("DiChuyen()",180); // 180 : tốc độ di chuyển của window
}
else
{
if(y<30)
{
y+=1;
window.setTimeout("DiChuyen()",180);
}
else
{
Co=0;
x=0;
y=0;
QuyDao();
}

}
}
if(Co!=1)
{
if(x>-14)
{
x-=1;
window.setTimeout("DiChuyen()",180);
}
else
{
if(y>-29)
{
y-=1;
window.setTimeout("DiChuyen()",180);
}
else
{
clearTimeout();
}
}
}
}


function DiChuyen()
{
window.CuaSo.moveBy(x,y);
QuyDao();
if(CuaSo.document.close()) {}
}


function CuaSoBay()
{

CuaSo=window.open("","MrHot","resizable=1,scrollbars=1,toolbar=0,status=0");
window.CuaSo.resizeTo(260,100);
window.CuaSo.moveTo(0,0);
CuaSo.document.open();
CuaSo.document.writeln("<HTML><title>Cửa sổ bay.</title><META content='text/html; charset=windows-1252' http-equiv=Content-Type><body bgcolor=#fffff0><left><font face=verdana color=#0000ff size=2>HVF - hiencam.vnbb.com <br><center><a href=javascript:window.close()><font face=verdana size=2 ><b>[ Đóng ]</b></a></font></center></body></html>");

Co=1;
x=0;
y=0;
QuyDao();
}

</script>

</head>

<body >

<a href=javascript:CuaSoBay()><font face=verdana size=2><b>Mo cua so</b></font></a>

</HTML>