In jquery, you can set an element in the page to be non-editable or triggered by jqueryobj.attr ("disabled", "disabled"), but the jquery APIThe reference does not indicate how to reset the elements of the page to disable to be triggered or editable. It is found here that there are three workarounds to change the state of the element set to Disabled to Enabled.The
Everything about the err-disabled status
I. Role of the err-disabled status: Generally, if the vswitch is running normally, one of the ports is enabled. however, if the software of the switch (Cisco IOS/CatOS) detects some port errors, the port will be closed immediately. that is to say, when the operating system of the switch detects some errors on the switch port, the switch will automatically close
The properties of input in HTML readonly and disabled let many users feel that is the same, I would like to introduce the readonly and disabled differences, there is a need to understand the friends can refer.
First look at the attribute definition of input:Attribute Value Description
Disabled disabled disables this
Http://www.jb51.net/article/19342.htmIn jquery, you can set an element in the page to be non-editable or triggered by jqueryobj.attr ("disabled", "disabled");It is found here that there are three workarounds to change the state of the element set to Disabled to Enabled.The first: Change the Boolean state of the disabled
The following describes three methods to change the boolean status of disabled. You can refer to the first method: Change the boolean status of disabled. The specific code and explanation are as follows:
The Code is as follows:
The Code is as follows:
$ ("Button: eq (2)"). click (function (){Var text2 = $ ("input: text: eq (2 )");If (text2.attr ("disabled") =
Here we can use three workarounds to change the state of an element that is set to disabled to enabled.
First, change the boolean status of disabled. The code and explanation are as follows:
Copy codeThe Code is as follows: $ ("button: eq (2)"). click (function (){
Var text2 = $ ("input: text: eq (2 )");
If (text2.attr ("disabled") = false ){
// Set the
Jquery APIs provide the following methods to apply the disabled and readonly attributes to elements:
1. readonly
$ ('Input '). ATTR ("readonly", "readonly") // set the input element to readonly $ ('input '). removeattr ("readonly"); // remove the readonly attribute of the input element if ($ ('input '). ATTR ("readonly") = true) // determine whether the readonly attribute has been set for the input element. There are two methods to set the readonly at
ReadOnly and disabled are the two attributes that are used in the form, and they all enable users to not change the content in the form fields. But there is a slight difference between them, summed up as follows:ReadOnly is valid only for input (Text/password) and textarea, and disabled is valid for all form elements, including Select, Radio, CheckBox, Button, and so on.However, when the form element is use
ReadOnly and disabled are the two attributes that are used in the form, and they all enable users to not change the content in the form fields. But there is a slight difference between them, summed up as follows:ReadOnly is valid only for input (Text/password) and textarea, and disabled is valid for all form elements, including Select, Radio, CheckBox, Button, and so on.However, when the form element is use
Change the Boolean state of disabled, the following for you to introduce three kinds of relatively good methods, you can refer to the following First: Change the Boolean state of the disabled, the specific code and interpretation as follows:nbsp; nbsp; code as follows:nbsp; nbsp; code as follows: $ ("Button:eq (2)"). Click (function () {nbsp; var text2=$ ("Input:text:eq (2)");nbsp; if (text2.attr ("
ReadOnly and disabled are two properties that are used in a form to make it impossible for users to change the contents of a form field. But there is a slight difference between them, summed up as follows:
ReadOnly is only valid for input (Text/password) and textarea, and disabled is valid for all form elements, including Select, Radio, CheckBox, Button, and so on.
However, after the form element is used
Jquery sets readonly and disabled of elements.
The Jquery api provides a method to apply the disabled and readonly attributes to elements, which is recorded here. As follows:
1. readonly
$ ('Input '). attr ("readonly", "readonly") // set the input element to readonly $ ('input '). removeAttr ("readonly"); // remove the readonly attribute of the input element if ($ ('input '). attr ("readonly") = true) // de
The Jquery api provides a method to apply the disabled and readonly attributes to the element, if you are interested, you can practice using Jquery APIs to provide methods for applying the disabled and readonly attributes to elements. Here, we will record them. As follows:
1. readonly
The Code is as follows:
$ ('Input'). attr ("readonly", "readonly") // set the input element to readonly.$ ('Input').
The jquery API provides a way to apply disabled and ReadOnly attributes to elements, which are documented here. As follows:1.readonly$ (' input '). attr ("ReadOnly", "ReadOnly")//The INPUT element is set to ReadOnly$ (' input '). Removeattr ("readonly");//Remove the ReadOnly attribute of the INPUT elementif ($ (' input '). attr ("readonly") ==true)//Determine if the INPUT element has the ReadOnly attribute setThere are two ways to set the ReadOnly pro
Excerpt: Jquery APIs provide methods to apply the disabled and readonly attributes to elements.
1. readonly$ ('Input'). attr ("readonly", "readonly") // set the input element to readonly.$ ('Input'). removeAttr ("readonly"); // remove the readonly attribute of the input element.If ($ ('input'). attr ("readonly") = true) // you can determine whether the readonly attribute has been set for the input element.There are two ways to set the readonly attribu
The Jquery api provides a method to apply the disabled and readonly attributes to elements, which is recorded here. As follows:1. readonly Copy codeThe Code is as follows:$ ('Input'). attr ("readonly", "readonly") // set the input element to readonly.$ ('Input'). removeAttr ("readonly"); // remove the readonly attribute of the input element.If ($ ('input'). attr ("readonly") = true) // you can determine whether the readonly attribute has been set f
Setting the Disable property is slightly different from other properties:
$ ("#workend"). attr ("Disabled", true);$ ("#workend"). attr ("disabled", false);
$ (' input '). attr ("Disabled", "disabled")//sets the INPUT element to disabled$ (' input '). Removeattr ("
First look at the attribute definition of input:Attribute Value Description
Disabled disabled disables this element when the INPUT element is first loaded, so that the user cannot write text in it, or select it.Note: cannot be used with type= "hidden".ReadOnly ReadOnly indicates that the value of this field cannot be modified.Note: Can only be used with type= "text".
In addition, I look at the two differe
Turn--http://www.jb51.net/article/19342.htmIn jquery, you can set an element in the page to be non-editable or triggered by jqueryobj.attr ("disabled", "disabled"), but the jquery API The reference does not indicate how to reset the elements of the page to disable to be triggered or editable.It is found here that there are three workarounds to change the state of the element set to
It is found that three workarounds can be used to change the state of the element that is placed to disabled to Enabled.
First: Change the Boolean state of the disabled, the specific code and interpretation as follows:
Copy Code code as follows:
$ ("Button:eq (2)"). Click (function () {
var text2=$ ("Input:text:eq (2)");
if (text2.attr ("disabled
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.