Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Untitled
SUBMITTED BY:
trior
DATE:
Dec. 23, 2015, 2:21 p.m.
FORMAT:
HTML
SIZE:
591 Bytes
Raw
Download
Tweet
HITS:
838
Go to comments
Report
<!doctype html>
<
html
lang
=
"en"
>
<
head
>
<
script
src
=
"https://code.jquery.com/jquery-2.1.0.min.js"
></
script
>
</
head
>
<
body
style
=
"background-color: white; color: black;"
>
<
textarea
rows
=
"6"
id
=
"t"
>
there is no
love in the ghetto
so come here
and get it
</
textarea
>
<
input
type
=
"button"
onclick
=
"getline()"
value
=
"get line"
/>
<
script
type
=
"text/javascript"
>
function
getline
()
{
var
t
=
$
(
"#t"
)[
0
];
alert
(
t
.
value
.
substr
(
0
,
t
.
selectionStart
).
split
(
"\n"
).
length
);
}
</
script
>
</
body
>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus