Data | How the Web page in the Vs.net/c# Builder development of the Web page can also realize the DOS input data carriage return line function
The Institute of Economic and Information Research, Beijing Coal Research Center, St.
In the DOS era, we
Author: Wang Xianrong
Conclusion
Javascript obtains the string in the textarea text box. If a carriage return or line break is contained,\ NInstead of what we usually see\ R \ n".
Problems Found
When creating a small website today, You need
Listen to and disable browser carriage return event instances in JavaScript, and listen to javascript
Js listens to browser carriage return events and supports browsers such as ie6 +, Firefox, and Google.Copy codeThe Code is as follows:
So, how to
JavaScript prevents the carriage return from submitting a form. It is a javascript form.
You should be familiar with the function of the Enter key. For example, in many applications of windows, you only need to click the Enter key to enter the
Javascript uses the carriage return key to replace the cursor movement function of the tab key.
Blog type:
Javascript
Javascript
Add the following code to the page to be changed:
JS Code
To change the order in which the cursor moves,
Intro:
In the ASP.net page, the index of the TextBox is 1 (or n), followed by the Submit button index of 2 (N+1), the cursor is in the textbox, and the auto focus moves after the carriage return to the button on the back, triggering the button's
Javascript registers the carriage return event (sets the default button) method for the button, javascript event
This example describes how to register a carriage return event (set the default button) with javascript. Share it with you for your
HTML uses input to prevent carriage return submission
By default, a single input box, regardless of the button's type= "Submit" or a type= "button" type, is submitted by carriage return.
1. When the type= "submit", no matter how many type= "text"
Javascript obtains the string in the textarea text box. If a carriage return or line break is contained,\ NInstead of what we usually see\ R \ n".
//If we want to obtain the carriage return Position entered by the user in textareaCode:VaRPos =
It's been a long time since I wrote Jekyll blog on Vim, and it's been a hassle to write code blocks (Fence) and then "type", and manually write header information (Front matter). Harttle today uses the VIM keyboard mapping to provide carriage return
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.