I have this code but I need to be able to input either lower case or upper case and get a result. For example I want to enter history and get back History Book and also enter HISTORY and get back History Book.
I there a way I can do this.
Here is my code.
<html>
<head>
<title>Untitled</title>
<script type="text/javascript">
<!--
function show_prompt()
{
var book=prompt("Enter a book");
if(book == "history" ){
document.write("<b>History Book</b>");
}else if( book == "maths" ){
document.write("<b>Maths Book</b>");
}else if( book == "economics" ){
document.write("<b>Economics Book</b>");
}else{
document.write("<b>Unknown Book</b>");
}
}
//-->
</script>
</head>
<body>
<input type="button" onclick="show_prompt()" value="click here to find out the book you need" />
</body>
</html>