How to set the form read-only by javascript
This article mainly introduces the javascript how to set the form read-only related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe that everyone after reading this javascript how to set the form read-only article will have a harvest, let's take a look.
Javascript sets the form read-only method: 1, through the "onfocus=this.blur ()" method setting; 2, through readonly; 3, through disabled setting.
This article operating environment: windows7 system, javascript1.8.5 version, Dell G3 computer.
How does javascript make the form read-only?
_ javascript: a way to make the form text box read-only and not editable
Sometimes, we want the text box in the form to be read-only, so that the user cannot modify the information, such as the word "China". The ways of implementation can be summarized as follows.
Method 1: onfocus=this.blur ()
Method 2:readonly
Method 3: disabled
This is the end of the article on "how to set the form to read-only in javascript". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to set the form read-only in javascript". If you want to learn more, you are welcome to follow the industry information channel.