In this jQuery article I will explain how to change text to uppercase or lowercase or convert text to uppercase/lowercase using jQuery in asp.net.
In previous articles I explained Change the style of tooltip in jQuery, jQuery Countdown timer script example, jQuery Increase or Decrease font size of website, Redirect to another page after some time delay, jQuery slideUp slideDown toggle effects and many articles relating to JQuery and asp.net. Now I will explain how to convert text to uppercase or lowercase using jQuery in asp.net.
|
<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>
|
|
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|
Subscribe by RSS
Subscribe by Email
0 comments :