(Javascript) How do you ignore lower/upper case being registered in search bars when searching for a specific item -
i tasked constructing search engine website displays various pictures have different titles. ie, "pictures of birds"
, "flying birds"
, "green birds"
. of when type in "birds"
first 2 results display.
how can ignore case sensitive searches, when user types in "birds"
3 searches come up.
i hear converting string uppercase/lowercase ignore it. however, unfamiliar how implement this.
of have line of code within function:
var str = document.getelementbyid('searchtxt').value; var upper = str.touppercase(); console.log(str);
i trying print value in variable console
. nothing working , on console 2 objects defined.
if explain need code functioning, i'd grateful.
you logging unconverted string console.
console.log(upper);
should trick
Comments
Post a Comment