Here you can find a number of examples on Java Script.Please find the various kinds of examples listed on the right side of this site. If you don't find anything on Java Script then please write to us or leave a commnet. We are pleased to help and find the solution of your problem.

Javascript: Scroll on Statusbar



<html>
<head>
<title>Scroll on Statusbar</title>

<script language="javascript">
var msg="Welcome to my site"
window.status=msg;
var scr;
function scroll()
{
var fchar=msg.substring(0,1);
var length=msg.length;
msg=msg.substring(1,length)+fchar;
window.status=msg;
}
function startscroll()
{
scrollInterval=window.setInterval("scroll()",100);
}
function stopscroll()
{
window.clearInterval(scrollInterval);
window.status="Welcome to my site"
}
</script>

</head>
<body>
<h1>Start Scroll and Stop Scroll</h1>

<form name="f1">
<input type="button" value="Start Scroll" onclick="startscroll()">
<input type="button" value="Stop Scroll" onclick="stopscroll()">
</form>

</body>
</html>

No comments:

Post a Comment

Google