Stack Overflow for Teams is moving to its own domain! and turn it into this. By this method, You not only able to remove or add the required attribute, But you can remove or add another attribute also. How to Make a BMI Calculator in Javascript? Description: Bind an event handler to the "select" JavaScript event, or trigger that event on an element. How to find an element based on a data-attribute value in jQuery? version added: 1.0 .select ( handler ) handler Type: Function ( Event eventObject ) A function to execute each time the event is triggered. The :selected selector works for