Kom først til denne:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1"><title>Ingen titel</title>
<style type="text/css">
html {background:url('
http://www.eksperten.dk/img/elogo.png');height:100%;}
</style>
<script type="text/javascript">
window.onload=function(){
elms=document.body.childNodes;
for(i=0,j=elms.length;i<j;i++){
elms[i].onmouseover=function(){noclick(true);};
elms[i].onmouseout=function(){noclick(false);};
}
}
function noclick(t){
de=document.documentElement;
de.style.cursor=t?"auto":"pointer";
if(t)de.onclick=function(){};
else de.onclick=function(){window.location.href="
http://www.eksperten.dk";};}
</script>
</head><body>
<div style="width:300px;background:#888;">aaa<br>aaa</div>
<br><br><br>
<div style="width:300px;background:#888;"><div style="width:200px;background:#999;">aaa<br>aaa</div></div>
<br><br><br>
<div style="width:400px;background:#888;"><div style="width:300px;background:#bbb;"><div style="width:200px;background:#999;">aaa<br>aaa</div></div></div>
</body></html>
... Men hvis musen var over baggrunden og opdater så kunne man ikke klikke fra start af (møllen kunne så vendes men så ville problemet være at man kunne klikke fra start af selvom man ikke var over bagrunden) ...
- En løsning på det problem kunne jeg ikke helt lave - det virker lidt gnidret:
(den timeout visning / skjulning på 500 ms er lidt voldsom ... )
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1"><title>Ingen titel</title>
<style type="text/css">
html {background:url('
http://www.eksperten.dk/img/elogo.png');height:100%;}
</style>
<script type="text/javascript">
window.onload=function(){
noclick(false);
elms=document.body.firstChild.childNodes;
for(i=0,j=elms.length;i<j;i++){
elms[i].onmouseover=function(){noclick(true);};
elms[i].onmouseout=function(){noclick(false);};
}
document.body.firstChild.style.display="none";
setTimeout("document.body.firstChild.style.display='block';",500);
}
function noclick(t){
de=document.documentElement;
de.style.cursor=t?"auto":"pointer";
if(t)de.onclick=function(){};
else de.onclick=function(){window.location.href="
http://www.eksperten.dk";};}
</script>
</head><body><div>
<div style="width:300px;background:#888;">aaa<br>aaa</div>
<br><br><br>
<div style="width:300px;background:#888;"><div style="width:200px;background:#999;">aaa<br>aaa</div></div>
<br><br><br>
<div style="width:400px;background:#888;"><div style="width:300px;background:#bbb;"><div style="width:200px;background:#999;">aaa<br>aaa</div></div></div>
</div></body></html>