Friday, October 28, 2011

How to count no of rows in a Textarea in javascript

function rowcount()

var area = document.getElementById("hist");
var text = area.value.replace(/\s+$/g, "");
var split = text.split("\n");
return split.length;
}

No comments:

Post a Comment