Good day,
I need help unfortunately.
I'm trying to make a search bar but I'm failing with the special characters, especially Ä Ü Ö.
I want to replace the characters with au ue oe. if I do it like this:
Code
/*/////it does not work/////*/
<input type="text" id="myInput" onkeyup="searchGo()" name="search" placeholder="Search..">
<script>
function umlaut(str) {
return str
.replace(/Ä/g, "AE")
.replace(/ä/g, "ae")
.replace(/Ö/g, "OE")
.replace(/ö/g, "oe")
.replace(/Ü/g, "UE")
.replace(/ü/g, "ue");
}
function searchGo() {
var input, filter;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
alert(umlaut(filter));
}
</script>
/////Input: King//////
/////Output: King//////
/*/////And so it goes/////*/
<script>
function umlaut(str) {
return str
.replace(/Ä/g, "AE")
.replace(/ä/g, "ae")
.replace(/Ö/g, "OE")
.replace(/ö/g, "oe")
.replace(/Ü/g, "UE")
.replace(/ü/g, "ue");
}
var filter="king"
alert(umlaut(filter));
</script>
/////Input: King//////
/////Output: king//////
Alles anzeigen
But I want it as a search bar.
I do n't understand can you please help me?
https://camsites.me/category/sex-cams/