1. <select style="width:195px" name="role" id="role" onfocus="this.defaultIndex=this.selectedIndex;" onchange="this.selectedIndex=this.defaultIndex;"> This approach makes the drop-down box look the same as usual. The only difference is that after you pull down and select, it won’t respond to you. It’s the same whether you select it or not. It just ignores the customer's choice. 2. Set the disabled attribute <select style="width:195px" name="role" id="role" disabled="disabled"> This looks more direct, and it feels like read-only, and you can’t click or pull down. The words inside will also turn gray. When the attribute is set to "disabled", the select value cannot be passed when the form is submitted. Remove the disabled attribute before submitting $("#role").removeAttr("disabled"); jquery adds the attribute $("#role").attr("disabled","disabled"); |
<<: Nginx reverse proxy learning example tutorial
>>: Five things a good user experience designer should do well (picture and text)
Preface In the Linux operating system, device fil...
Meta tag function The META tag is a key tag in th...
Problem Description I want to use CSS to achieve ...
Table of contents 1. Introduction 2. Environment ...
1. parseFloat() function Make a simple calculator...
1. How to construct? Let's review the common ...
How to refresh iframe 1. To refresh, you can use j...
1. Requirements description Display the delete ic...
background During the project development process...
Trigger Introduction A trigger is a special store...
Table of contents 1. What is 2. Use Numeric Enume...
This article shares the specific code of Vue+ssh ...
Because Ubuntu 20.04 manages the network through ...
Table of contents I've been learning React re...
Table of contents 1. How to monitor Tomcat 2. Jav...