Processing of the disappearance of the (textarea) carriage return line break when a request (URL) is submitted, textarea carriage return line break
About the processing that the (textarea) carriage return line break disappears when the request (URL) is submitted. Sometimes, when we enter a query on the page, we want to query multiple at the same time. Then, press enter to separate the content of each query.
The background can only receive strings without the carriage return line break.
One of the following requests
Window. location = "$ {ctx}/post/cusQueryMailExport? CustomerId = "+ customerId +" & postTimeStart = "+ postTimeStart +" & postTimeEnd = "+ postTimeEnd +" & mailNo = "+ mailNo;
If mailNo is a bar code separated by carriage return, the bar code will only be a string at the background, and the line break is removed by default. However, if the form is submitted, the line break is retained.
Therefore, when you submit a request, process it first.
Var mailNo = $ ("# mailNo "). val (). replace (/[\ r \ n]/g, ","); // replace the carriage return ","
In this way, the backend can be separated by commas.
String [] mails = paramMap. get ("mailNo"). toString (). trim (). split (","); // when exporting,