Pastetool #108

URL: , Paste another

// uses jQuery to limit and implement maxlength from TextArea
// fedmich 12:08 PM 8/9/2008
$(document).ready(function(){
	$('textarea[maxlength]').keyup(function(){
		var otx = $(this);
		var maxl = parseInt(otx.attr('maxlength'));
		if(otx.val().length > maxl){
			otx.val(otx.val().substr(0, otx.attr('maxlength')));
		}
	});
});

Download code

This javascript code was pasted on October 9, 2009




Protected with advance Anti-SPAM techniques :)
Coded and designed by Fedmich
Follow us on Twitter