14. JavaScript Program to Convert Lowercase letter into Uppercase letter.
How does this program work?
- In this program you are going to learn about how to convert uppercase letter of a given lowercase using JavaScript.
- In this program we are using String functions.
- By using String functions we can easily convert lowercase to uppercase and viceversa.
Here is the code
<html>
<head>
<title>JavaScript Program to convert Lowercase letter into Uppercase</title>
</head>
<body>
<table>
<tr>
<td> <input type="text" name="a" id="first" placeholder="Enter string"/> </td>
</tr>
<tr>
<td> <button onclick="lowertoupper ()">Submit</button> </td>
</tr>
</table>
<div id ="num"></div>
</body>
<script type="text/javascript">
function lowertoupper()
{
var a,str;
a = document.getElementById("first").value;
str = a.toUpperCase();
document.getElementById("num").innerHTML ="Uppercase Character : " +str;
}
</script>
</html>