Mahlzeit,
Etwas eleganter gehts wohl mit:
Und NOCH eleganter wäre es so:
function check(element, id) {
var other = document.getElementById(id);
if (typeof(other) == 'object') {
other.checked = element.checked;
}
}
Und der korrekte HTML-Code lautet:
<input type="checkbox" name="hobby6" value="Handball" onclick="check(this,'sport')">
MfG,
EKKi
--
sh:( fo:| ch:? rl:( br:> n4:~ ie:% mo:} va:) de:] zu:) fl:{ ss:) ls:& js:|
sh:( fo:| ch:? rl:( br:> n4:~ ie:% mo:} va:) de:] zu:) fl:{ ss:) ls:& js:|