Hello
I have Improved my solution:
<input type="text" id="Card1">
<button onclick="myFunction()">Click me</button>
<script>
function myFunction() {
var a = document.getElementById("Card1").value;
var b = parseInt(a);
if(1 <= b && b <= 10) { alert("Done!"); }
else {
switch(a.toLowerCase()){
case "a": alert("Done!");
break;
case "j" : alert("Done!");
break;
case "k": alert("Done!");
break;
case "q" : alert("Done!");
break;
default: alert("Error!");
}
}
}
</script>
I have tried it and it works fine.
Best Regards