<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jQuery Convert Text to Lowercase or Uppercase</title>
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript">
$(function() {
// Convert to UpperCase
$('#txtName').keyup(function() {
this.value = this.value.toUpperCase();
});
// Convert to LowerCase
$('#txtLocation').keyup(function() {
this.value = this.value.toLowerCase();
})
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>UpperCase Textbox:<input type="text" id="txtName" /></p>
<p>LowerCase Textbox: <input type="text" id="txtLocation" /></p>
</div>
</form>
</body>
</html>
<head>
<title>jQuery Convert Text to Lowercase or Uppercase</title>
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript">
$(function() {
// Convert to UpperCase
$('#txtName').keyup(function() {
this.value = this.value.toUpperCase();
});
// Convert to LowerCase
$('#txtLocation').keyup(function() {
this.value = this.value.toLowerCase();
})
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>UpperCase Textbox:<input type="text" id="txtName" /></p>
<p>LowerCase Textbox: <input type="text" id="txtLocation" /></p>
</div>
</form>
</body>
</html>