Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function timer(){
setTimeout('contentchanger()',6000);
return false;
}
function contentchanger() {
var d1=document.getElementById? document.getElementById('div1') : document.all['div1'],
d2=document.getElementById? document.getElementById('div2') : document.all['div2'];
d1.innerHTML=d2.innerHTML;
}
</script>
</head>
<body>
<div>
<a href="#" onclick="return timer();">Click</a><br>
<div id="div1">When clicked, this text will not show</div>
<div id="div2">After clicking this should be the content of both divs</div>
</div>
</body>
</html>
Bookmarks