<body>
<script>
function aa(){var re;
re = /\r\n/g;
return form1.content.value.replace(re,"<BR>");//content??textarea?name
}
</script>
<form id=form1>
<textarea id=content>
</textarea>
</form>
<input type=button onclick="alert(aa())">
</body>