Something like this:-
Code:
txt = txt.replace(/Ä/g,"-");
txt = txt.replace(/ä/g,"-");
txt = txt.replace(/Ë/g,"-");
txt = txt.replace(/ë/g,"-");
Or perhaps you mean:-
Code:
<script type = "text/javascript">
var tstr = "Hello Ältere World";
var bstr = '';
for (i=0; i<tstr.length; i++) {
if (tstr.charCodeAt(i)>127) { // outside ASCII range
bstr += '-'; // change to a hyphen
}
else {
bstr += tstr.charAt(i);
}
}
alert (bstr);
</script>
Quizmaster: In legend, the gryphon has the body of a lion and the head and wings of which bird?
Contestant: A goose