Introduction:
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.
Description:
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.
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.
To convert upper or lowercase we need
to write the code like as shown below
|
If you want to see this with complete
example check below code
Example
<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>
|
Live
Demo
To
check Live demo try to enter data in below textboxes
|
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. |
|||
|
|||
1 comments :
Hello guys..
agar hamare pass 40 textbox hain to kya hame 40 functions banane padege ???....
Note: Only a member of this blog may post a comment.