<html>
<head>
<title></title>
<script>
function convertLetter() {
var word = document.getElementById('word').value;
var position = document.getElementById('position').value;
var letter = word.charAt(position);
if (letter == letter.toUpperCase())
letter = letter.toLowerCase();
else
letter = letter.toUpperCase();
document.getElementById('letter').value = letter;
}
</script>
</head>
<body>
<label for="word">Word</label>
<input name="word" id="word" type="text" />
<label for="position">Position</label>
<input name="position" id="position" type="text" />
<label for="letter">Letter</label>
<input name="letter" id="letter" type="text" />
<button onclick="convertLetter();">Submit</button>
</body>
</html>