wegen weihnachten und so :-)
PHP-Code:<html>
<head>
<title>Leerzeichen ersetzen</title>
<script type="text/javascript">
function pruefeInhalt (feld) {
var inhalt = feld.value;
if (inhalt.indexOf(" ") != -1) {
feld.value = inhalt.replace(/ /g, "-");
}
}
</script>
</head>
<body>
<form>
<p>Text: <input name="text" type="text" onblur="pruefeInhalt(this);" onkeyup="pruefeInhalt(this);"
></p>
</form>
</body>
</html>

LinkBack URL
About LinkBacks
Zitieren
