Limit Number of Characters in a TextArea using jQuery
jQuery MaxLength for INPUT and TEXTAREA: | Limit Number of Characters in a TextArea using jQuery:
In this post we see an Example in which we take a text box
control and count number of entered character at run time. Some time we need
this type of code when we working on web application. As like use restriction
on comment section or Address section or some time when we take feedback for
user. Here we consider solution of this type of code by using Jquery.
Asp.net jquery related other post:
- Check Uncheck all asp.net CheckBox in asp.net using jQuery
- Example of jQuery Validate on Radiobuttonlist in Asp.Net using C#
- Example jQuery Validate on CheckBoxList using C#
- Check Uncheck all html CheckBox controls using jQuery:
- fill data into Dropdown list by using Jquery
- Validate ASP.Net RadioButtonList using JavaScript Example
- Example of jQuery Validate on Radiobuttonlist in Asp.Net using C#
- Limitation of Characters in Textbox or TextArea in asp.netusing jquery:
- Example jQuery Validate on CheckBoxList using C#
- Check Uncheck all asp.net CheckBox in asp.net using jQuery
- Check Uncheck all html CheckBox controls using jQuery:
- Asp.net CheckBoxList using jQuery.
- Cropping image using jQuery in asp.net
- Displaying the textbox value in javascript Messagebox
- Get selected radio button values using JQuery.
- How do you do html text encodes using JavaScript
- Get selected radio button values using JQuery
- jQuery Crop Image in Asp.net using Jcrop jQuery
How to limit characters inside a text area in asp.net
<%@ Page
Language="C#"
AutoEventWireup="true"
CodeFile="limitofchacterintextbox.aspx.cs"
Inherits="limitofchacterintextbox"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD
XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> </title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type='text/javascript'>
$(function () {
$('#textarea1').keyup(function
() {
var desc = $('#textarea1').val();
var len = desc.length;
if (desc.length >= 150) {
this.value = this.value.substring(0,
150);
}
$('#spam1').text(150 - len + ' Characters Left');
});
});
</script>
<style type="text/css">
#textarea1
{
width: 465px;
height: 87px;
}
</style>
</head>
<body>
<div align="center">
<h1>limit characters inside a text area in asp.net |
<br />
Limit Number of Characters in a TextArea using jQuery:</h1>
<br />
<textarea id="textarea1"></textarea><br/>
<span id="spam1"> 150 Characters left</span></div>
</body>
</html>
Limit number of characters entered by Jquery:
Restrict number of characters entered in textarea by jquery:
Some time we search this Question in google these type, We
type on searchbox as like jQuery Limit Number of Characters in a TextArea or jquery
textarea limit characters per line or jquery limit textarea length or jquery
count characters in textarea or limit number of characters in textarea
javascript or limit characters in textarea using javascript or jquery textarea
max length and jquery textarea counter.
Asp.net Related Other Post:
- Asp.net textbox control in inside of gridview
- How to Bind Gridview Form database.
- Show gridview Row Details And Give Example
- Example of Templatefield in asp.net gridview.
- Example of DropDownList inside GridView control
- Introduction of Asp.net grid view Control.
- Example of C# for Bind Data to asp.net Textbox inside gridview control
- Bind Data to asp.net textbox control in inside of gridview Using C# Example
- ListView.LayoutTemplate Property
- How to use table for ListView layout in asp.net
- How to use table layout in ListView control in ASP.Net
- How to use Asp ListView control in asp.net
- ASP.NET ListView Demo Data and layout templates
- Fill Dropdown By database.
- Adding or binding tooltip in each item of dropdownlist
- DropDown List in asp.net Programming,
- Drop Down List control of asp.net
- Add ListItem in DropDownList asp.net c# Example
- Display tooltip from database for dropdownlist items in asp.net c# example
- Show tooltip dropdownlist items by mouseoverevent using C# example
- Example of Adding ToolTip for each Dropdown List Item in C#.
Comments
Post a Comment