I recently studied discuz and found that many backend settings are filled in with textarea and each row is interesting, avoid wasting too much time on the control issues during the settings. Let's just move on to the code: $ namesn... I recently
Http://livedocs.adobe.com/flex/3/html/help.html? Content1_textcontrols_05.html
Selecting and modifying text
You can select and modify text in textarea, textinput, and richtexteditor controls. To change a label or text control'
Today, I encountered a textarea line feed problem in the project, which was not solved after debugging for half a day. You need to convert the carriage return text in textarea into a br and store it in the database. The following is my solution to
Two days ago, I studied the line feed rule of textarea, which is quite complicated:How to obtain the intuitive line depends not only on the cols size, but also on the webpage encoding method.Cols = "30" textarea, in fact, each line can contain 29
Two days ago, I studied the line feed rule of textarea, which is quite complicated:
How to obtain the intuitive line depends not only on the Cols size, but also on the webpage encoding method.Cols = "30" textarea, in fact, each line can contain 2
TextArea Line Change
TextArea is saved to the MySQL database when using inline editing in the DataGrid in Easyui \ nEnter a return character in the textarea the value in the JS read textarea has \ r \ n then to the business layer conversion to
Here is my solution to the problem, and finally I understand it, it's a sewer that almost capsized
1. You must know that the line break in TextArea is \ n (personal detection found that pressing ENTER is \ n, as if it were \ r \ n under Linux)
2.
When you use in-row editing in the DataGrid in easyui, the line feed of textarea is saved to the MySQL database \ n.In textarea, input a carriage return character to read the value \ r \ n from textarea in JS, and then convert it to string at the
The code is as follows
$names = Preg_split ('/rn/', $_post[' textarea '));foreach ($names as $name) {Todo something Eg:echo $name;}
The value is very simple, then the assignment, in the TEXTAREA output line break is not so
Today, I encountered a textarea line feed problem in the project, which was not solved after debugging for half a day. You need to convert the line breaks in textarea into and save them to the database.
The following is my solution to this
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.