JavaScript Browser Vibration


JavaScript Browser Vibration

Want to make a surprise on your web visitors? Make the following HTML file. In this script there is javascript that works to make your website visitor's browser to vibrate.



<HTML>
<HEAD>
<TITLE> Browser yang bisa menari</TITLE>
<script language="JavaScript" type="text/javascript">
function init() {
setTimeout("shake(3)",1000);
setTimeout("this.focus()",4000);
setTimeout("shake(3)",4100);
}
function register()
{
var isAol = "no";
var res = 800 ;
}
function shake(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}
a=275;
b=275;
r=20;
x=1;
z=1;
function rotate(r) {
while (z<=3) {
for (var i = 0; i <360; i++) {
x = (r * Math.cos((i * Math.PI)/180)) + a;
y = (r * Math.sin((i * Math.PI)/180)) + b;
window.moveTo(x,y);
}
z+= 1;
}
setTimeout("shake(3)",10000);
}
</script>
</HEAD>
<BODY ONLOAD="init()" BGCOLOR="Black">
</BODY>
</HTML>

0 comments:

Post a Comment