Hier nochmal der Code in Textformat, falls jemand daran etwas ändern möchte:
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Willkommen</title></head>
<body> <script type="text/javascript"> function animiere() { var ladebalken = document.getElementById("ladebalken"); var laenge = parseInt(ladebalken.style.width);
laenge++; ladebalken.style.width = laenge + "px";
if (laenge < 400) { window.setTimeout(animiere, 10); } } </script> <span id="ladebalken" style="display: block; background:purple; height: 40px; width: 0px;"> </span> <button><a href="javascript:animiere()">Jetzt Laden</a></button>