<html>
<head>
<title>Matching a single literal character(It can be either a lower or upper case character) </title>
<script type="text/javascript" language="javascript">
<!-- //
function IsMatchingChar(str){
var myRegExp = /[aA]/ ;
return myRegExp.test(str)
}
function TestGuess(){
alert(IsMatchingChar("A"));
}
// -->
</script>
</head>
<body>
<h3>This page allows you to guess a single
literal character of either case</h3>
<form>
<button type="Button" onclick="TestGuess()">Click here to guess</button>
</form>
</body>
</html>
|