Rainer: var in JS übergeben

Hallo, hab gerade einen Blackout. Warum geht folgendes nicht?

<!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></title>
<script type="text/javascript">
function detail(ID){
document.getElementById(ID).style.display = "block";
}
</script>
</head>

<body>
<a href="#" onclick="detail(AZ5)">mehr ...</a>
<div id="AZ5" style="display:none;">Alles was jetzt noch kommen soll</div>
</body>
</html>

Gruß Rainer

  1. Sorry, bin wieder wach

    <a href="#" onclick="detail('AZ5')">mehr ...</a>

    und schon geht es.

  2. Die Javascript-Console deines Browser sollte dir vom Schlauch helfen.