Hallo Fritz.
(Allgemein ist es nicht sonderlich sauberer Stil, JS-Anweisungen direkt im HTML zu notieren. Es gibt sauberer Möglichkeiten.)
Auch in diesem Fall nicht?
Hm, das „nicht“ ergibt in Bezug auf meine Anmerkung keinen Sinn.
dann also keine Eventhandler? Wird da nicht der Code enorm aufgebläht?
Ich meinte eher, dass du den Eventhandler gleich dynamisch per JS setzen lassen kannst, zum Beispiel wie folgt:
window.onload = function() {
document.[ref:self811;javascript/objekte/forms.htm@title=forms][0].[ref:self811;javascript/objekte/elements.htm@title=elements][0].onblur = function() {
if (/\S.+/.test(this.value) == false) {
this.value = 'xyz';
}
};
};
Einen schönen Samstag noch.
Gruß, Ashura
--
sh:( fo:} ch:? rl:( br: n4:~ ie:{ mo:| va:) de:> zu:} fl:( ss:) ls:[ js:|
„It is required that HTML be a common language between all platforms. This implies no device-specific markup, or anything which requires control over fonts or colors, for example. This is in keeping with the SGML ideal.“
[HTML Design Constraints: Logical Markup]
sh:( fo:} ch:? rl:( br: n4:~ ie:{ mo:| va:) de:> zu:} fl:( ss:) ls:[ js:|
„It is required that HTML be a common language between all platforms. This implies no device-specific markup, or anything which requires control over fonts or colors, for example. This is in keeping with the SGML ideal.“
[HTML Design Constraints: Logical Markup]