Here's one way:
Code:
<!DOCTYPE html>
<html>
<head>
<title>Restar Marquee - Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
marquee {
width: 550px;
}
</style>
<script type="text/javascript">
function restartmarq(){
var marq = document.getElementsByTagName('marquee')[0];
marq.stop();
marq.parentNode.replaceChild(restartmarq.marq.cloneNode(true), marq);
}
function grabmarq(){
restartmarq.marq = document.getElementsByTagName('marquee')[0].cloneNode(true);
}
if (window.addEventListener){
window.addEventListener('load', grabmarq, false);
}
else if (window.attachEvent){
window.attachEvent('onload', grabmarq);
}
</script>
</head>
<body>
<marquee>Her leering backers chaotically heap up a reassuring universalist. The curious bachelors enthusedly afford little for an arrogant banshee. That puzzled turtle hardly amuses the lilting beagles. Your approving unicorns guiltlessly memorize the scrawny bongos. Your smoggy bakers enthusiastically annoy those scowling tongues. Our brave aces adversarially alert the quaint aardvarks. Your quarrelsome whales cheerlessly apologize for a loving acre. Your absorbing families acutely analyze a black aspersion. The cultured blocks credulously heat those quaking turtledoves. Your mincing tirades deftly admire the ancient animals. </marquee>
<br><input type="button" value="Restart" onclick="restartmarq();">
</body>
</html>
Bookmarks