Javascript/Jquery code
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(e) {
$("#enter_title").keyup(function(){
var enter_title = $(this).val();
var enter_title_length = enter_title.length;
$("#enter_title_counter").text(enter_title_length);
});
});
</script>
<script type="text/javascript">
$(document).ready(function(e) {
$("#enter_title").keyup(function(){
var enter_title = $(this).val();
var enter_title_length = enter_title.length;
$("#enter_title_counter").text(enter_title_length);
});
});
</script>
HTML Code
<label for="enter_title">Enter Title</label>
<input type="text" id="enter_title" />
<div id="enter_title_counter"></div>
<input type="text" id="enter_title" />
<div id="enter_title_counter"></div>
HTML/Jquery Code
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
$("#enter_title").keyup(function(){
var enter_title = $(this).val();
var enter_title_length = enter_title.length;
$("#enter_title_counter").text(enter_title_length);
});
});
</script>
</head>
<body>
<label for="enter_title">Enter Title</label><br />
<input type="text" id="enter_title" /><br />
<div id="enter_title_counter"></div>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
$("#enter_title").keyup(function(){
var enter_title = $(this).val();
var enter_title_length = enter_title.length;
$("#enter_title_counter").text(enter_title_length);
});
});
</script>
</head>
<body>
<label for="enter_title">Enter Title</label><br />
<input type="text" id="enter_title" /><br />
<div id="enter_title_counter"></div>
</body>
</html>
No comments:
Post a Comment