You are here: irt.org | FAQ | JavaScript | form | 3.5 | Q1805 [ previous next ]
Try this:
<script>
var cr = '\n';
function doublespace(formField) {
return formField.value.replace(cr,cr+cr);
</script>Or to use an event handler directly:
<textarea rows=10 onChange="cr='\n';this.value=this.value.replace(cr,cr+cr)" wrap="hard"<>/textarea>