<html>
<body>
<script language="javascript">
var intInterval = 0
function myInterval(){
alert('Hello');
}
</script>
<button onclick="intInterval=window.setInterval('myInterval()', 1000);">
Start interval
</button>
<button onclick="intInterval=window.clearInterval(intInterval);">
Stop interval
</button>
</body>
</html>
|