Using jsp servlert, after the content entered in the text box reaches the far right, the text content will automatically wrap
and when I save it to the database for display, I want to get the content that completely matches the entered form, but there is no way get.
That is, I can only find the hard carriage return but cannot recognize the content that automatically returns after the content is full.
I am now wondering if there is a way to get line-by-line reading content from the text field, similar to readline for reading text files
Which expert can help me and give me some suggestions
Text field The line breaks in are not displayed in the database, but they do exist
After reading the data, the display format in the text field is the original format and will not change
If you want to display it directly on the web page, you need str.replace("n" ,"
").replace(" ","& nbsp;")
But the text field will not automatically wrap and display
If you want the text field to be displayed intact, except for the above The steps are to use a div to put data, set the div width to be consistent with the text field, and then set the div auto-wrap attribute, and that’s it