One of my recent projects was for a chemical plant, which required a large amount of data to be entered during the process. The small keyboard area was used. In the past, data was entered through excel. Now,
is on the web page. I need to implement the carriage return and line feed function like Excel. I looked for questions about this on the Internet, but they are not very easy to use. Some people also provided ideas on how to do it.
After my sorting and testing , can solve this problem very well:
Required conditions
1. For the Jquery library address, you can go to the jquery.com official website to download the latest one.
2. View the interface form The structure and corresponding form position
Pay attention to the context tag relationship that needs to be positioned in the form http://images.cnitblog.com/i/461877/201403/131104380377939.jpg After generating the page, no matter where the punctuation element is, but there is After the label element with unchanged structure, we need to switch to the form element and type="text"
Then use Jquery's selector level selector prev next positioning. If you don't know much about it, you can check the jquery help document. It doesn’t matter what method you use as long as you can locate the element you want to select