<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
function break_lines
(v
){
//TEXTAREA "#t" VALUE
var text
= v.
replace(/\n/gi,
"<br>");
//FOR EVERY "LINE" IN THE TEXTAREA, A <br> WILL BE IN HTML
$(
"#text").html(text);
//NEW TEXT WILL BE DISPLAYED IN HTML
}
</script>
</head>
<body>
<textarea id=
"t" onClick=
"break_lines(this.value)"></textarea>
<div id="text"></div>
</body>
</html>