This is the demo page of the trim() and nl2br() PHP function in Javascript

Enter a string in the textarea with whitespaces or newlines(Enter key) and see the
different implementation of the functions by clicking the buttons.Normal Return button returns the string with no function in it.



Tags: delete whitespaces in string Javascript, format string in Javascript, format text input and textarea Javascript, nl2br function in Javascript, replace enter key Carriage return newline with line break Javascript, string manipulation Javascript, trim function in Javascript