<html>
<script>
function startEQ()
{
quake=5;
parent.moveBy(0,quake);
parent.moveBy(0,-quake);
parent.moveBy(quake,0);
parent.moveBy(-quake,0);
timer=setTimeout("startEQ()",10);
}
function stopEQ()
{
clearTimeout(timer);
}
</script>
</head>
<body>


DEMO IT HERE
<form>
<input type="button" onclick="startEQ()" value="Start an earthquake">
<input type="button" onclick="stopEQ()" value="Stop the earthquake">
</form>
</body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.