How can i read total characters in specific line ?
i want user only will enter 75 chars in textarea with 5 lines only , means user can only use 5 enters or return, after 5 enter or return he will not be able to enter more chars. so 15 chars in one line.
i can get the current line number with following code, how about calculating total chars in that line onkeypress ?
function getLineNumber()
{
var t = $("#textareaId")[0];
console.log(t.value.substr(0, t.selectionStart).split("\n").length);
}