Hallo Lachgas
// in anzahl wird beim Funktionsaufruf die anzahl der vorhanden
// checkboxen übergeben und in chkbox der wert "this"
[-- wert 'this' ist das eine variable? --]
var cntChecked = 0;
[-- in dieser variablen nehme ich an werden die checkboxen gezählt, oder? --]
function zaehle(chkbox, anzahl)
{
if (chkbox.checked)
{
cntChecked = cntChecked + 1;
}
else
{
cntChecked = cntChecked - 1;
}
//alert(cntChecked, anzahl)
ist 'chkbox' eine vordefienirte variable oder ist eine feld name?
wozu braucht die function die variable 'anzahl'?
was ist der tag 'alert'?
thx für die antworten und die mühe